Files
YouTube.js/deno/src/parser/classes/PivotButton.ts
2023-12-01 03:55:35 +00:00

28 lines
1005 B
TypeScript

import { type RawNode } from '../index.ts';
import { YTNode } from '../helpers.ts';
import Thumbnail from './misc/Thumbnail.ts';
import NavigationEndpoint from './NavigationEndpoint.ts';
import Text from './misc/Text.ts';
export default class PivotButton extends YTNode {
static type = 'PivotButton';
thumbnail: Thumbnail[];
endpoint: NavigationEndpoint;
content_description: Text;
target_id: string;
sound_attribution_title: Text;
waveform_animation_style: string;
background_animation_style: string;
constructor(data: RawNode) {
super();
this.thumbnail = Thumbnail.fromResponse(data.thumbnail);
this.endpoint = new NavigationEndpoint(data.onClickCommand);
this.content_description = new Text(data.contentDescription);
this.target_id = data.targetId;
this.sound_attribution_title = new Text(data.soundAttributionTitle);
this.waveform_animation_style = data.waveformAnimationStyle;
this.background_animation_style = data.backgroundAnimationStyle;
}
}