mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 19:42:14 +00:00
18 lines
490 B
JavaScript
18 lines
490 B
JavaScript
'use strict';
|
|
|
|
const Text = require('./Text');
|
|
const NavigationEndpoint = require('./NavigationEndpoint');
|
|
|
|
class Button {
|
|
type = 'buttonRenderer';
|
|
|
|
constructor(data) {
|
|
this.text = new Text(data.text).toString();
|
|
this.label = data.accessibility?.label || null;
|
|
this.tooltip = data.tooltip || null;
|
|
this.icon_type = data.icon?.iconType || null;
|
|
this.endpoint = new NavigationEndpoint(data.navigationEndpoint || data.serviceEndpoint);
|
|
}
|
|
}
|
|
|
|
module.exports = Button; |