feat(ChipBarView): Parse renderer_context

This commit is contained in:
LuanRT
2026-03-19 11:23:05 -03:00
parent 32623de485
commit 39158838f1

View File

@@ -1,14 +1,22 @@
import { YTNode, type ObservedArray } from '../helpers.js';
import { Parser, type RawNode } from '../index.js';
import { RendererContext } from '../misc.js';
import ChipView from './ChipView.js';
export default class ChipBarView extends YTNode {
static type = 'ChipBarView';
chips: ObservedArray<ChipView>;
public chips: ObservedArray<ChipView>;
public chip_bar_state_entity_key?: string;
public renderer_context?: RendererContext;
constructor(data: RawNode) {
super();
this.chips = Parser.parseArray(data.chips, ChipView);
this.chip_bar_state_entity_key = data.chipBarStateEntityKey;
if ('rendererContext' in data) {
this.renderer_context = new RendererContext(data.rendererContext);
}
}
}