mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-15 10:32:14 +00:00
25 lines
680 B
TypeScript
25 lines
680 B
TypeScript
import Parser from '..';
|
|
import { YTNode } from '../helpers';
|
|
|
|
import Thumbnail from './misc/Thumbnail';
|
|
|
|
class CarouselItem extends YTNode {
|
|
static type = 'CarouselItem';
|
|
|
|
items: YTNode[];
|
|
background_color: string;
|
|
layout_style: string;
|
|
pagination_thumbnails: Thumbnail[];
|
|
paginator_alignment: string;
|
|
|
|
constructor (data: any) {
|
|
super();
|
|
this.items = Parser.parseArray(data.carouselItems);
|
|
this.background_color = data.backgroundColor;
|
|
this.layout_style = data.layoutStyle;
|
|
this.pagination_thumbnails = Thumbnail.fromResponse(data.paginationThumbnails);
|
|
this.paginator_alignment = data.paginatorAlignment;
|
|
}
|
|
}
|
|
|
|
export default CarouselItem; |