Files
YouTube.js/src/parser/classes/mweb/MobileTopbar.ts
2024-12-08 17:11:57 -03:00

20 lines
578 B
TypeScript

import { YTNode } from '../../helpers.js';
import Text from '../misc/Text.js';
import { Parser, type RawNode } from '../../index.js';
export default class MobileTopbar extends YTNode {
static type = 'MobileTopbar';
public placeholder_text: Text;
public buttons;
public logo_type?: string;
constructor(data: RawNode) {
super();
this.placeholder_text = new Text(data.placeholderText);
this.buttons = Parser.parseArray(data.buttons);
if (Reflect.has(data, 'logo') && Reflect.has(data.logo, 'iconType'))
this.logo_type = data.logo.iconType;
}
}