export const CELL_TYPE_BADGES = {
    notation: { label: "Root", cssClass: "badge-notation" },
    section: { label: "Section", cssClass: "badge-section" },
    repeat: { label: "Repeat", cssClass: "badge-repeat" },
    cycle: { label: "Cycle", cssClass: "badge-cycle" },
    beatduration: { label: "Beat", cssClass: "badge-beatduration" },
    breaks: { label: "Breaks", cssClass: "badge-breaks" },
    role: { label: "Role", cssClass: "badge-role" },
    group: { label: "Group", cssClass: "badge-group" },
    line: { label: "Line", cssClass: "badge-line" },
    rawblock: { label: "Text", cssClass: "badge-rawblock" },
};
export function getCellTypeBadge(blockType) {
    const badge = CELL_TYPE_BADGES[blockType.toLowerCase()];
    if (badge) {
        return badge;
    }
    return {
        label: blockType,
        cssClass: "badge-unknown",
    };
}
let cellIdCounter = 0;
export function generateCellId() {
    return `cell-${++cellIdCounter}`;
}
export function createDefaultCellState(blockItem, depth) {
    let type;
    if (blockItem.TYPE === "Block") {
        type = blockItem.blockType;
    }
    else if (blockItem.TYPE === "Line") {
        type = "line";
    }
    else if (blockItem.TYPE === "RawBlock") {
        type = "rawblock";
    }
    else {
        type = "unknown";
    }
    return {
        id: generateCellId(),
        type,
        depth,
        isExpanded: true,
        isEditing: false,
        hasError: false,
    };
}
//# sourceMappingURL=notebook.js.map