mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-22 14:08:06 +00:00
27 lines
683 B
TypeScript
27 lines
683 B
TypeScript
import { Parser, type RawNode } from '../index.js';
|
|
import { type SuperParsedResult, YTNode } from '../helpers.js';
|
|
|
|
export default class SubscriptionNotificationToggleButton extends YTNode {
|
|
static type = 'SubscriptionNotificationToggleButton';
|
|
|
|
states: {
|
|
id: string;
|
|
next_id: string;
|
|
state: SuperParsedResult<YTNode>;
|
|
};
|
|
|
|
current_state_id: string;
|
|
target_id: string;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.states = data.states.map((data: RawNode) => ({
|
|
id: data.stateId,
|
|
next_id: data.nextStateId,
|
|
state: Parser.parse(data.state)
|
|
}));
|
|
|
|
this.current_state_id = data.currentStateId;
|
|
this.target_id = data.targetId;
|
|
}
|
|
} |