import { ILeaf, ILeaferCanvas, IBoundsData, IRenderOptions, IPointData, ITransition, IBoundsType, IMatrixData, IAxis, IAlign, ILeafList, ILeafLevelList, IFunction } from '@leafer/interface';

declare const LeafHelper: {
    updateAllMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean): void;
    updateMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean): void;
    updateBounds(leaf: ILeaf): void;
    updateAllWorldOpacity(leaf: ILeaf): void;
    updateChange(leaf: ILeaf): void;
    updateAllChange(leaf: ILeaf): void;
    worldHittable(t: ILeaf): boolean;
    draggable(t: ILeaf): boolean;
    copyCanvasByWorld(leaf: ILeaf, currentCanvas: ILeaferCanvas, fromCanvas: ILeaferCanvas, fromWorld?: IBoundsData, blendMode?: string, onlyResetTransform?: boolean): void;
    renderComplex(_leaf: ILeaf, _canvas: ILeaferCanvas, _options: IRenderOptions): void;
    updateComplex(_leaf: ILeaf): void;
    checkComplex(_leaf: ILeaf): void;
    moveWorld(t: ILeaf, x: number | IPointData, y?: number, isInnerPoint?: boolean, transition?: ITransition): void;
    moveLocal(t: ILeaf, x: number | IPointData, y?: number, transition?: ITransition): void;
    zoomOfWorld(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
    zoomOfLocal(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
    rotateOfWorld(t: ILeaf, origin: IPointData, angle: number, transition?: ITransition): void;
    rotateOfLocal(t: ILeaf, origin: IPointData, angle: number, transition?: ITransition): void;
    skewOfWorld(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void;
    skewOfLocal(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void;
    transformWorld(t: ILeaf, transform: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
    transform(t: ILeaf, transform: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
    setTransform(t: ILeaf, transform: IMatrixData, resize?: boolean, transition?: ITransition, boundsType?: IBoundsType): void;
    getFlipTransform(t: ILeaf, axis: IAxis): IMatrixData;
    getLocalOrigin(t: ILeaf, origin: IPointData | IAlign): IPointData;
    getInnerOrigin(t: ILeaf, origin: IPointData | IAlign): IPointData;
    getRelativeWorld(t: ILeaf, relative: ILeaf, temp?: boolean): IMatrixData;
    updateScaleFixedWorld(_t: ILeaf): void;
    updateOuterBounds(_t: ILeaf): void;
    cacheId(_t: ILeaf): void;
    drop(t: ILeaf, parent: ILeaf, index?: number, resize?: boolean): void;
    hasHighPosition(t: ILeaf): boolean;
    hasOffset(t: ILeaf): boolean;
    hasParent(p: ILeaf, parent: ILeaf): boolean | void;
    animateMove(t: ILeaf, move: IPointData, speed?: number): void;
};

declare const LeafBoundsHelper: {
    worldBounds(target: ILeaf): IBoundsData;
    localBoxBounds(target: ILeaf): IBoundsData;
    localStrokeBounds(target: ILeaf): IBoundsData;
    localRenderBounds(target: ILeaf): IBoundsData;
    maskLocalBoxBounds(target: ILeaf, index: number): IBoundsData;
    maskLocalStrokeBounds(target: ILeaf, index: number): IBoundsData;
    maskLocalRenderBounds(target: ILeaf, index: number): IBoundsData;
    excludeRenderBounds(child: ILeaf, options: IRenderOptions): boolean;
};

declare const BranchHelper: {
    sort(a: ILeaf, b: ILeaf): number;
    pushAllChildBranch(branch: ILeaf, leafList: ILeafList | ILeafLevelList): void;
    pushAllParent(leaf: ILeaf, leafList: ILeafList | ILeafLevelList): void;
    pushAllBranchStack(branch: ILeaf, pushList: ILeaf[]): void;
    updateBounds(branch: ILeaf, exclude?: ILeaf): void;
    updateBoundsByBranchStack(branchStack: ILeaf[], exclude?: ILeaf): void;
    move(branch: ILeaf, x: number, y: number): void;
    scale(branch: ILeaf, x: number, y: number, scaleX: number, scaleY: number, a: number, b: number): void;
};

declare const WaitHelper: {
    run(wait: IFunction[]): void;
};

export { BranchHelper, LeafBoundsHelper, LeafHelper, WaitHelper };
