feat(YouTube/Search): add SearchSubMenu node (#340)

This commit is contained in:
LuanRT
2023-03-07 04:17:58 -03:00
committed by GitHub
parent cf8a33c79f
commit a511608f18
6 changed files with 78 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
import { ObservedArray, YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
import Parser, { YTNodes } from '../index.js';
import Text from './misc/Text.js';
class SearchSubMenu extends YTNode {
static type = 'SearchSubMenu';
title: Text;
groups: ObservedArray<YTNodes.SearchFilterGroup> | null;
button: YTNodes.ToggleButton | null;
constructor(data: RawNode) {
super();
this.title = new Text(data.title);
this.groups = Parser.parseArray(data.groups, YTNodes.SearchFilterGroup);
this.button = Parser.parseItem(data.button, YTNodes.ToggleButton);
}
}
export default SearchSubMenu;