mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-24 07:11:48 +00:00
26 lines
687 B
TypeScript
26 lines
687 B
TypeScript
import Parser from '../index';
|
|
import NavigationEndpoint from './NavigationEndpoint';
|
|
import SectionList from './SectionList';
|
|
import MusicQueue from './MusicQueue';
|
|
import RichGrid from './RichGrid';
|
|
|
|
import { YTNode } from '../helpers';
|
|
|
|
class Tab extends YTNode {
|
|
static type = 'Tab';
|
|
|
|
title: string;
|
|
selected: boolean;
|
|
endpoint;
|
|
content;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.title = data.title || 'N/A';
|
|
this.selected = data.selected || false;
|
|
this.endpoint = new NavigationEndpoint(data.endpoint);
|
|
this.content = Parser.parseItem<SectionList | MusicQueue | RichGrid>(data.content, [ SectionList, MusicQueue, RichGrid ]);
|
|
}
|
|
}
|
|
|
|
export default Tab; |