Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(parser): Add ClientSideToggleMenuItem #835

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(parser): Add ClientSideToggleMenuItem
jonz94 committed Dec 11, 2024
commit 0379e7b939b4c39deb18c838f8b0e5a288b1b14b
22 changes: 22 additions & 0 deletions src/parser/classes/ClientSideToggleMenuItem.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
import Text from './misc/Text.js';

export default class ClientSideToggleMenuItem extends YTNode {
static type = 'ClientSideToggleMenuItem';

text: Text;
icon_type: string;
toggled_text: Text;
toggled_icon_type: string;
menu_item_identifier: string;

constructor(data: RawNode) {
super();
this.text = new Text(data.defaultText);
this.icon_type = data.defaultIcon.iconType;
this.toggled_text = new Text(data.toggledText);
this.toggled_icon_type = data.toggledIcon.iconType;
this.menu_item_identifier = data.menuItemIdentifier;
}
}
1 change: 1 addition & 0 deletions src/parser/nodes.ts
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ export { default as ChipBarView } from './classes/ChipBarView.js';
export { default as ChipCloud } from './classes/ChipCloud.js';
export { default as ChipCloudChip } from './classes/ChipCloudChip.js';
export { default as ChipView } from './classes/ChipView.js';
export { default as ClientSideToggleMenuItem } from './classes/ClientSideToggleMenuItem.js';
export { default as ClipAdState } from './classes/ClipAdState.js';
export { default as ClipCreation } from './classes/ClipCreation.js';
export { default as ClipCreationScrubber } from './classes/ClipCreationScrubber.js';