feat(MultiPageMenuNotificationSection): Add notification_section_title

This commit is contained in:
Luan
2025-04-11 17:10:55 -03:00
parent 14ea875c67
commit f8690118c3
2 changed files with 14 additions and 5 deletions

View File

@@ -1,15 +1,24 @@
import { Parser } from '../../index.js';
import { type ObservedArray, YTNode } from '../../helpers.js';
import type { RawNode } from '../../index.js';
import { Parser, type RawNode } from '../../index.js';
import ContinuationItem from '../ContinuationItem.js';
import Message from '../Message.js';
import Notification from '../Notification.js';
import Text from '../misc/Text.js';
export default class MultiPageMenuNotificationSection extends YTNode {
static type = 'MultiPageMenuNotificationSection';
public items: ObservedArray<YTNode>;
public notification_section_title?: Text;
public items: ObservedArray<Notification | Message | ContinuationItem>;
constructor(data: RawNode) {
super();
this.items = Parser.parseArray(data.items);
if ('notificationSectionTitle' in data) {
this.notification_section_title = new Text(data.notificationSectionTitle);
}
this.items = Parser.parseArray(data.items, [ Notification, Message, ContinuationItem ]);
}
// XXX: Alias for consistency.

View File

@@ -5,7 +5,7 @@ import { Parser, type RawNode } from '../../index.js';
export default class MultiPageMenuSection extends YTNode {
static type = 'MultiPageMenuSection';
public items: ObservedArray<YTNode> | null;
public items: ObservedArray<YTNode>;
constructor(data: RawNode) {
super();