mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-14 10:02:16 +00:00
* replaced YTNode's data arg as RawNode * updated documentation * removed unused import ---- Note that there are still many nodes that need to be updated, hence the WIP status.
25 lines
804 B
TypeScript
25 lines
804 B
TypeScript
import Parser from '../../index.js';
|
|
import type Button from '../Button.js';
|
|
import type ToggleButton from '../ToggleButton.js';
|
|
import type CreatorHeart from './CreatorHeart.js';
|
|
import { YTNode } from '../../helpers.js';
|
|
import type { RawNode } from '../../index.js';
|
|
|
|
class CommentActionButtons extends YTNode {
|
|
static type = 'CommentActionButtons';
|
|
|
|
like_button;
|
|
dislike_button;
|
|
reply_button;
|
|
creator_heart;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.like_button = Parser.parseItem<ToggleButton>(data.likeButton);
|
|
this.dislike_button = Parser.parseItem<ToggleButton>(data.dislikeButton);
|
|
this.reply_button = Parser.parseItem<Button>(data.replyButton);
|
|
this.creator_heart = Parser.parseItem<CreatorHeart>(data.creatorHeart);
|
|
}
|
|
}
|
|
|
|
export default CommentActionButtons; |