mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-27 16:48:55 +00:00
feat(parser): Add FormPopup.ts parser class (#1057)
* Update src/parser/classes/FormPopup.ts --------- Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
This commit is contained in:
21
src/parser/classes/FormPopup.ts
Normal file
21
src/parser/classes/FormPopup.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { YTNode } from '../helpers.js';
|
||||
import { Parser, type RawNode } from '../index.js';
|
||||
import { type ObservedArray } from '../helpers.js';
|
||||
import Text from './misc/Text.js';
|
||||
import Form from './Form.js';
|
||||
import Button from './Button.js';
|
||||
|
||||
export default class FormPopup extends YTNode {
|
||||
static type = 'FormPopup';
|
||||
|
||||
title: Text;
|
||||
form: Form | null;
|
||||
buttons: ObservedArray<Button>;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.title = new Text(data.title);
|
||||
this.form = Parser.parseItem(data.form, Form);
|
||||
this.buttons = Parser.parseArray(data.buttons, Button);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user