mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 11:32:27 +00:00
39 lines
961 B
TypeScript
39 lines
961 B
TypeScript
import Text from '../misc/Text';
|
|
import Thumbnail from '../misc/Thumbnail';
|
|
import { YTNode } from '../../helpers';
|
|
|
|
class CommentsEntryPointHeader extends YTNode {
|
|
static type = 'CommentsEntryPointHeader';
|
|
|
|
header?: Text;
|
|
comment_count?: Text;
|
|
teaser_avatar?: Thumbnail[];
|
|
teaser_content?: Text;
|
|
simplebox_placeholder?: Text;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
|
|
if (data.header) {
|
|
this.header = new Text(data.headerText);
|
|
}
|
|
|
|
if (data.commentCount) {
|
|
this.comment_count = new Text(data.commentCount);
|
|
}
|
|
|
|
if (data.teaserAvatar || data.simpleboxAvatar) {
|
|
this.teaser_avatar = Thumbnail.fromResponse(data.teaserAvatar || data.simpleboxAvatar);
|
|
}
|
|
|
|
if (data.teaserContent) {
|
|
this.teaser_content = new Text(data.teaserContent);
|
|
}
|
|
|
|
if (data.simpleboxPlaceholder) {
|
|
this.simplebox_placeholder = new Text(data.simpleboxPlaceholder);
|
|
}
|
|
}
|
|
}
|
|
|
|
export default CommentsEntryPointHeader; |