import * as TSU from "@panyam/tsutils";
import { Entity } from "./entity";
import { Cycle } from "./cycle";
import { Line } from "./core";
export declare class RoleDef {
    name: string;
    notesOnly: boolean;
    index: number;
}
export declare class RawBlock extends Entity {
    content: string;
    contentType: string;
    readonly TYPE: string;
    constructor(content: string, contentType?: string);
    debugValue(): any;
}
export type BlockItem = Block | Line | RawBlock;
export declare function isBlock(item: BlockItem): item is Block;
export declare function isLine(item: BlockItem): item is Line;
export declare function isRawBlock(item: BlockItem): item is RawBlock;
export declare class Block extends Entity {
    readonly TYPE: string;
    readonly blockType: string;
    readonly name: TSU.Nullable<string>;
    readonly blockItems: BlockItem[];
    localCycle: TSU.Nullable<Cycle>;
    localAtomsPerBeat: TSU.Nullable<number>;
    localBreaks: TSU.Nullable<number[]>;
    readonly localRoles: Map<string, RoleDef>;
    private _parentBlock;
    protected _currRoleDef: TSU.Nullable<RoleDef>;
    protected _currentLine: TSU.Nullable<Line>;
    constructor(blockType: string, parent?: TSU.Nullable<Block>, name?: TSU.Nullable<string>);
    children(): BlockItem[];
    get parentBlock(): TSU.Nullable<Block>;
    get cycle(): TSU.Nullable<Cycle>;
    get atomsPerBeat(): number;
    get breaks(): number[];
    getRole(name: string): TSU.Nullable<RoleDef>;
    get currRoleDef(): TSU.Nullable<RoleDef>;
    setCurrRole(name: string): void;
    get currentLine(): Line;
    newLine(): Line;
    newRoleDef(name: string, notesOnly?: boolean): RoleDef;
    addBlockItem(item: BlockItem): void;
    removeBlockItem(item: BlockItem): number;
    debugValue(): any;
}
export declare function findContainingBlock(entity: Entity): TSU.Nullable<Block>;
export declare class SectionBlock extends Block {
    constructor(sectionName: string, parent?: TSU.Nullable<Block>);
    children(): BlockItem[];
}
export declare class RepeatBlock extends Block {
    readonly repeatCount: number;
    constructor(repeatCount: number, parent?: TSU.Nullable<Block>);
    children(): BlockItem[];
}
export declare class CycleBlock extends Block {
    constructor(cycle: Cycle, parent?: TSU.Nullable<Block>);
}
export declare class BeatDurationBlock extends Block {
    constructor(atomsPerBeat: number, parent?: TSU.Nullable<Block>);
}
export declare class BreaksBlock extends Block {
    constructor(breaks: number[], parent?: TSU.Nullable<Block>);
}
export declare class RoleBlock extends Block {
    constructor(roleName: string, notesOnly: boolean, parent?: TSU.Nullable<Block>);
}
export declare class GroupBlock extends Block {
    constructor(groupName: string | null, parent?: TSU.Nullable<Block>);
}
