mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 12:31:17 +00:00
38 lines
845 B
TypeScript
38 lines
845 B
TypeScript
import Text from './misc/Text';
|
|
import NavigationEndpoint from './NavigationEndpoint';
|
|
|
|
import { YTNode } from '../helpers';
|
|
|
|
class SettingBoolean extends YTNode {
|
|
static type = 'SettingBoolean';
|
|
|
|
title?: Text;
|
|
summary?: Text;
|
|
enable_endpoint?: NavigationEndpoint;
|
|
disable_endpoint?: NavigationEndpoint;
|
|
item_id: string;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
|
|
if (data.title) {
|
|
this.title = new Text(data.title);
|
|
}
|
|
|
|
if (data.summary) {
|
|
this.summary = new Text(data.summary);
|
|
}
|
|
|
|
if (data.enableServiceEndpoint) {
|
|
this.enable_endpoint = new NavigationEndpoint(data.enableServiceEndpoint);
|
|
}
|
|
|
|
if (data.disableServiceEndpoint) {
|
|
this.disable_endpoint = new NavigationEndpoint(data.disableServiceEndpoint);
|
|
}
|
|
|
|
this.item_id = data.itemId;
|
|
}
|
|
}
|
|
|
|
export default SettingBoolean; |