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:
Dave Nicolson
2025-10-12 15:30:24 +02:00
committed by GitHub
parent 3d6ed1def9
commit f738a173fc
2 changed files with 22 additions and 0 deletions

View 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);
}
}

View File

@@ -183,6 +183,7 @@ export { default as FeedTabbedHeader } from './classes/FeedTabbedHeader.js';
export { default as FlexibleActionsView } from './classes/FlexibleActionsView.js';
export { default as Form } from './classes/Form.js';
export { default as FormFooterView } from './classes/FormFooterView.js';
export { default as FormPopup } from './classes/FormPopup.js';
export { default as GameCard } from './classes/GameCard.js';
export { default as GameDetails } from './classes/GameDetails.js';
export { default as Grid } from './classes/Grid.js';