feat(parser): add GridShow and ShowCustomThumbnail

Closes #459
This commit is contained in:
LuanRT
2023-03-15 05:15:16 -03:00
parent b71f03caf2
commit 8ef4b42d44
5 changed files with 64 additions and 9 deletions

View File

@@ -1,13 +1,22 @@
import { YTNode } from '../helpers.js';
import { RawNode } from '../index.js';
import Text from './misc/Text.js';
class ThumbnailOverlayBottomPanel extends YTNode {
static type = 'ThumbnailOverlayBottomPanel';
icon_type: string;
text?: Text;
icon_type?: string;
constructor(data: any) {
constructor(data: RawNode) {
super();
this.icon_type = data.icon.iconType;
if (Reflect.has(data, 'text')) {
this.text = new Text(data.text);
}
if (Reflect.has(data, 'icon') && Reflect.has(data.icon, 'iconType')) {
this.icon_type = data.icon.iconType;
}
}
}