import { YTNode } from '../helpers.js';
import { Parser } from '../index.js';
import AvatarView from './AvatarView.js';
import RendererContext from './misc/RendererContext.js';
import SubscribeButtonView from './SubscribeButtonView.js';
import Text from './misc/Text.js';
export default class ListItemView extends YTNode {
    static type = 'ListItemView';
    title;
    subtitle;
    leading_accessory;
    renderer_context;
    trailing_buttons;
    constructor(data) {
        super();
        if ('title' in data) {
            this.title = Text.fromAttributed(data.title);
        }
        if ('subtitle' in data) {
            this.subtitle = Text.fromAttributed(data.subtitle);
        }
        this.leading_accessory = Parser.parseItem(data.leadingAccessory, AvatarView);
        if ('rendererContext' in data) {
            this.renderer_context = new RendererContext(data.rendererContext);
        }
        this.trailing_buttons = Parser.parseArray(data.trailingButtons?.buttons, SubscribeButtonView);
    }
}
//# sourceMappingURL=ListItemView.js.map