mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 17:17:03 +00:00
19 lines
551 B
TypeScript
19 lines
551 B
TypeScript
import NavigationEndpoint from './NavigationEndpoint.js';
|
|
import { YTNode } from '../helpers.js';
|
|
import type { RawNode } from '../index.js';
|
|
|
|
export default class ButtonCardView extends YTNode {
|
|
static type = 'ButtonCardView';
|
|
|
|
title: string;
|
|
icon_name: string;
|
|
on_tap_endpoint: NavigationEndpoint;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.title = data.title;
|
|
this.icon_name = data.image.sources[0].clientResource.imageName;
|
|
this.on_tap_endpoint = new NavigationEndpoint(data.rendererContext.commandContext.onTap);
|
|
}
|
|
}
|