mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 03:22:15 +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
27 lines
921 B
TypeScript
27 lines
921 B
TypeScript
import Parser from '../index.js';
|
|
import { ObservedArray, YTNode } from '../helpers.js';
|
|
import Button from './Button.js';
|
|
import Dropdown from './Dropdown.js';
|
|
import DropdownItem from './DropdownItem.js';
|
|
import Text from './misc/Text.js';
|
|
|
|
class CreatePlaylistDialog extends YTNode {
|
|
static type = 'CreatePlaylistDialog';
|
|
|
|
title: string;
|
|
title_placeholder: string;
|
|
privacy_option: ObservedArray<DropdownItem> | null;
|
|
cancel_button: Button | null;
|
|
create_button: Button | null;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.title = new Text(data.dialogTitle).toString();
|
|
this.title_placeholder = data.titlePlaceholder || '';
|
|
this.privacy_option = Parser.parseItem(data.privacyOption, Dropdown)?.entries || null;
|
|
this.create_button = Parser.parseItem(data.cancelButton, Button);
|
|
this.cancel_button = Parser.parseItem(data.cancelButton, Button);
|
|
}
|
|
}
|
|
|
|
export default CreatePlaylistDialog; |