mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
feat(YouTube/Search): add SearchSubMenu node (#340)
This commit is contained in:
21
src/parser/classes/SearchSubMenu.ts
Normal file
21
src/parser/classes/SearchSubMenu.ts
Normal 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;
|
||||
Reference in New Issue
Block a user