mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-22 22:18:14 +00:00
24 lines
705 B
TypeScript
24 lines
705 B
TypeScript
import { Parser, type RawNode } from '../index.js';
|
|
import { YTNode } from '../helpers.js';
|
|
import Button from './Button.js';
|
|
import Text from './misc/Text.js';
|
|
import Thumbnail from './misc/Thumbnail.js';
|
|
|
|
export default class RecognitionShelf extends YTNode {
|
|
static type = 'RecognitionShelf';
|
|
|
|
title: Text;
|
|
subtitle: Text;
|
|
avatars: Thumbnail[];
|
|
button: Button | null;
|
|
surface: string;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.title = new Text(data.title);
|
|
this.subtitle = new Text(data.subtitle);
|
|
this.avatars = data.avatars.map((avatar: RawNode) => new Thumbnail(avatar));
|
|
this.button = Parser.parseItem(data.button, Button);
|
|
this.surface = data.surface;
|
|
}
|
|
} |