import * as TSU from "@panyam/tsutils";
import { Atom, LeafAtom, Group } from "./core";
export declare abstract class Shape {
    private static idCounter;
    readonly shapeId: number;
    protected _x: number | null;
    protected _y: number | null;
    protected _width: number | null;
    protected _height: number | null;
    protected _bbox: TSU.Geom.Rect;
    protected _minSize: TSU.Geom.Size;
    protected parentShape: Shape | null;
    children: Shape[];
    get bbox(): TSU.Geom.Rect;
    get minSize(): TSU.Geom.Size;
    protected abstract refreshBBox(): TSU.Geom.Rect;
    protected abstract refreshMinSize(): TSU.Geom.Size;
    protected abstract updateBounds(x: null | number, y: null | number, w: null | number, h: null | number): [number | null, number | null, number | null, number | null];
    invalidateBounds(): void;
    setBounds(x: number | null, y: number | null, w: number | null, h: number | null, applyLayout?: boolean): [number | null, number | null, number | null, number | null];
    get hasX(): boolean;
    get hasY(): boolean;
    get hasWidth(): boolean;
    get hasHeight(): boolean;
    get x(): number;
    set x(x: number | null);
    get y(): number;
    set y(y: number | null);
    get width(): number;
    set width(w: number | null);
    get height(): number;
    set height(h: number | null);
    refreshLayout(): void;
}
export declare abstract class Embelishment extends Shape {
}
export declare class ElementShape<T extends SVGGraphicsElement = SVGGraphicsElement> extends Shape {
    readonly element: T;
    constructor(element: T);
    protected refreshBBox(): TSU.Geom.Rect;
    protected refreshMinSize(): TSU.Geom.Size;
    protected updateBounds(x: null | number, y: null | number, w: null | number, h: null | number): [number | null, number | null, number | null, number | null];
    refreshLayout(): void;
}
export declare abstract class AtomView extends Shape {
    depth: number;
    roleIndex: number;
    baseline: number;
    ascent: number;
    descent: number;
    capHeight: number;
    leading: number;
    abstract isLeaf(): boolean;
    abstract get totalDuration(): TSU.Num.Fraction;
    abstract createElements(parent: SVGGraphicsElement): void;
}
export declare abstract class LeafAtomView extends AtomView {
    leafAtom: LeafAtom;
    constructor(leafAtom: LeafAtom);
    isLeaf(): boolean;
    get viewId(): number;
    get totalDuration(): TSU.Num.Fraction;
}
export declare abstract class GroupView extends AtomView {
    group: Group;
    protected atomSpacing: number;
    protected groupElement: SVGGElement;
    protected atomViews: AtomView[];
    private _embelishments;
    defaultToNotes: boolean;
    needsLayout: boolean;
    scaleFactor: number;
    constructor(group: Group, config?: any);
    get totalDuration(): TSU.Num.Fraction;
    createElements(parent: SVGGraphicsElement): void;
    isLeaf(): boolean;
    protected refreshBBox(): TSU.Geom.Rect;
    protected refreshMinSize(): TSU.Geom.Size;
    abstract createAtomView(atom: Atom): AtomView;
    protected updateBounds(x: null | number, y: null | number, w: null | number, h: null | number): [number | null, number | null, number | null, number | null];
    refreshLayout(): void;
    get embelishments(): Embelishment[];
    protected createEmbelishments(): Embelishment[];
    setStyles(config: any): void;
}
