mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 11:32:27 +00:00
* refactor: move common info into MediaInfo * refactor: better inference on Memo * refactor: improved typesafety in parser methods * refactor: remove PlaylistAuthor in favor of Author * refactor: cleanup live chat parsers - Replace non standard author type with Author class - Remove redundant code * fix: new errors due to changes * fix: pass actions to FormatUtils#toDash * refactor!: merge NavigatableText and Text into single class
24 lines
663 B
TypeScript
24 lines
663 B
TypeScript
import Parser from '../index.js';
|
|
import Text from './misc/Text.js';
|
|
import Button from './Button.js';
|
|
|
|
import { YTNode } from '../helpers.js';
|
|
|
|
class ConfirmDialog extends YTNode {
|
|
static type = 'ConfirmDialog';
|
|
|
|
title: Text;
|
|
confirm_button: Button | null;
|
|
cancel_button: Button | null;
|
|
dialog_messages: Text[];
|
|
|
|
constructor (data: any) {
|
|
super();
|
|
this.title = new Text(data.title);
|
|
this.confirm_button = Parser.parseItem(data.confirmButton, Button);
|
|
this.cancel_button = Parser.parseItem(data.cancelButton, Button);
|
|
this.dialog_messages = data.dialogMessages.map((txt: any) => new Text(txt));
|
|
}
|
|
}
|
|
|
|
export default ConfirmDialog; |