import * as TSU from "@panyam/tsutils";
import { ElementShape } from "./shapes";
export class BeatView extends ElementShape {
    constructor(cell, beat, rootElement, cycle, config) {
        super(TSU.DOM.createSVGNode("g", {
            parent: rootElement,
            attrs: {
                class: `beatView role_${beat.role.name}`,
                beatId: "" + beat.uuid,
                id: "" + beat.uuid,
                roleName: beat.role.name,
                beatIndex: "" + beat.index,
                gridRow: cell.rowIndex,
                gridCol: cell.colIndex,
            },
        }));
        this.cell = cell;
        this.beat = beat;
        this.rootElement = rootElement;
        this.cycle = cycle;
        this.needsLayout = true;
        this.atomView = this.createAtomView();
        this.atomView.refreshLayout();
    }
    get embelishments() {
        if (!this._embelishments) {
            this._embelishments = this.createEmbelishments();
        }
        return this._embelishments;
    }
    setStyles(config) {
        this.needsLayout = true;
    }
}
//# sourceMappingURL=beatview.js.map