import { System } from '../system';
import { LayoutBase, LayoutLeaf } from '../system/platform/component/app/Editor/layout';
import { Callback } from '../types/Callback';
import { Dict } from '../types/Dict';
import { Unlisten } from '../types/Unlisten';
import { $Component } from '../types/interface/async/$Component';
import { $Graph } from '../types/interface/async/$Graph';
import { IOElement } from './IOElement';
import { Listener } from './Listener';
import { Context } from './context';
import { Position, Rect } from './util/geometry/types';
import { Scale } from './util/style/getScale';
export declare class Component<E extends IOElement = IOElement, P extends Dict<any> = {}, U extends $Component | $Graph = $Component> {
    static id: string;
    $_: string[];
    $element: E;
    $props: P;
    $changed: Set<string>;
    private _$node;
    $system: System;
    $localId: string;
    $remoteId: string;
    $ref: Dict<Component<any>>;
    $context: Context;
    $connected: boolean;
    $unit: U;
    $primitive: boolean;
    $propUnlisten: Dict<Unlisten>;
    $unbundled: boolean;
    $children: Component[];
    $slotChildren: Dict<Component[]>;
    $childSlotName: string[];
    $slot: Dict<Component>;
    $slotId: Dict<string>;
    $slotTarget: Dict<string>;
    $subComponent: Dict<Component>;
    $root: Component[];
    $wrap: boolean;
    $shadowSlot: HTMLSlotElement;
    $parentRoot: Component[];
    $parentRootSlotName: string[];
    $parentChildren: Component[];
    $parentChildrenSlot: string[];
    $mountRoot: Component[];
    $mountParentRoot: Component[];
    $mountParentChildren: Component[];
    $parent: Component | null;
    $slotParent: Component | null;
    $mounted: boolean;
    $listenCount: Dict<number>;
    private _stopPropagationSet;
    private _stopImmediatePropagationSet;
    private _preventDefaultSet;
    constructor($props: P, $system: System, $element?: E, $node?: E);
    get $node(): E;
    set $node($node: E);
    getProp(name: string): any;
    setProp<K extends keyof P>(prop: K, data: P[K]): void;
    private _prop_transformer;
    interceptProp(prop: string, transformer: Callback): Unlisten;
    getSlot(slotName: string): Component;
    onPropChanged(prop: string, current: any): void;
    _onPropChanged(prop: string, current: any): void;
    refreshProp(prop: string): void;
    onConnected($unit: U): void;
    onDisconnected(): void;
    onMount(): void;
    onUnmount($context: Context): void;
    onDestroy(): void;
    dispatchEvent(type: string, detail?: any, bubbles?: boolean): void;
    dispatchContextEvent(type: string, data?: any): void;
    stopPropagation(event: string): void;
    cancelStopPropagation(event: string): void;
    stopImmediatePropagation(event: string): void;
    attachText(type: string, text: string): void;
    attachDropTarget(): void;
    preventDefault(event: string): Unlisten;
    private _releasePointerCapture;
    hasPointerCapture(pointerId: number): boolean;
    setPointerCapture(pointerId: number): void;
    releasePointerCapture(pointerId: number): void;
    scrollIntoView(opt: ScrollIntoViewOptions): void;
    private $detached;
    private _animateBase;
    register(): void;
    unregister(): void;
    detach(host: string, opt: {
        animate?: boolean;
    }): void;
    attach(opt: {
        animate?: boolean;
    }): void;
    templateBase: (base: LayoutBase, root: (parent: Component, leaf_comp: Component) => void, parentRoot: (parent: Component, leaf_comp: Component) => void) => void;
    templateLeaf: (leaf: LayoutLeaf, root: (parent: Component, leaf_comp: Component) => void, parentRoot: (parent: Component, leaf_comp: Component) => void) => void;
    domRemoveBase: (base: LayoutBase) => void;
    domRemoveLeaf: (leaf: LayoutLeaf) => void;
    domAppendBase: (base: LayoutBase) => void;
    mountChild(child: Component, commit?: boolean): void;
    unmountDescendent(child: Component): void;
    private _forAllMountDescendent;
    private _forAllDescendent;
    commit(): void;
    mount($context: Context, commit?: boolean): void;
    unmount(): void;
    focus(options?: FocusOptions | undefined): void;
    blur(): void;
    deselect(): void;
    containsSelection(): boolean;
    animate(keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation[];
    getAnimatableBase(): Component<HTMLElement | SVGElement>[];
    getAnimationsById(id: string): Animation[];
    getAnimations(): Animation[];
    cancelAnimation(id: string): void;
    commitAnimation(id: string): void;
    getOffset(): Component;
    getElementPosition(): import("./util/geometry/types").Point;
    getElementSize(): import("./util/geometry/types").Size;
    getFontSize(): number;
    getOpacity(): number;
    getScale(): Scale;
    getTextAlign(): string;
    getRootPosition(rootId: string): Position;
    getParentRootPosition(subComponentId: string, parentRootId: string): Position;
    isSVG(): boolean;
    isHMTL(): boolean;
    isText(): boolean;
    isBase(): boolean;
    getRootBase(path?: string[]): [string[], Component][];
    getFirstRootLeaf(): Component;
    getBase(path?: string[]): [string[], Component][];
    pathGetSubComponent(path: string[]): Component;
    getRect(): Rect;
    getBoundingClientRect(): Rect;
    appendChild(child: Component, slotName?: string): number;
    memAppendChild(child: Component, slotName: string, at: number): void;
    domAppendChild(child: Component, slotName?: string, at?: number): void;
    postAppendChild(child: Component, slotName: string, at: number): void;
    createSVGWrapper(): Component<SVGSVGElement>;
    private _createHTMLWrapper;
    templateChildWrapper(child: any, svg: any, html: any, fallback: any): any;
    domRemoveChild(child: Component, slotName?: string, at?: number): void;
    postRemoveChild(child: Component, at: number): void;
    hasChild(at: number): boolean;
    ascendChild(child: Component, slotName?: string): void;
    $listener: Listener[];
    $unlisten: Unlisten[];
    $named_listener_count: Dict<number>;
    $named_unlisten: Dict<Unlisten>;
    private _unit_unlisten;
    private _addUnitEventListener;
    private _removeUnitEventListener;
    connect($unit: U, deep?: boolean): void;
    _connect($unit: U, deep?: boolean): void;
    private _$instanceChild;
    disconnect(deep?: boolean): void;
    _disconnect(deep?: boolean): void;
    setChildren(children?: Component[], slotNames?: string[]): void;
    memRemoveChildAt(child: Component, slotName: string, at: number): void;
    removeChildAt(at: number): number;
    removeChild(child: Component): number;
    removeChildren(): void;
    hasRoot(component: Component): boolean;
    pushRoot(component: Component): void;
    pullRoot(component: Component): void;
    fitRoot(component: Component, at: number): void;
    registerRoot(component: Component): void;
    registerRootAt(component: Component, at: number): void;
    unregisterRoot(component: Component): void;
    memAppendRoot(component: Component): void;
    postAppendRoot(component: Component): void;
    domAppendRoot(component: Component): void;
    protected domCommitAppendChild(component: Component): void;
    protected domCommitInsertChild(component: Component, at: number): void;
    appendRoot(component: Component): void;
    insertRootAt(component: Component, _at: number): void;
    postInsertRootAt(component: Component, _at: number): void;
    memInsertRootAt(component: Component, _at: number): void;
    domInsertRootAt(component: Component, _at: number): void;
    appendAllRoot(): void;
    appendAllMissingRoot(): void;
    removeAllRoot(): void;
    removeRoot(component: Component): void;
    memRemoveRoot(component: Component): void;
    domRemoveRoot(component: Component, at: number): void;
    postRemoveRoot(component: Component): void;
    compose(): void;
    decompose(deep?: boolean): void;
    hasParentRoot(component: Component): boolean;
    pushParentRoot(component: Component, slotName: string): void;
    insertParentRoot(component: Component, at: number, slotName: string): void;
    unshiftParentRoot(component: Component, slotName: string): void;
    pullParentRoot(component: Component): void;
    registerParentRoot(component: Component, slotName?: string): void;
    unregisterParentRoot(component: Component): void;
    collapse(deep?: boolean): void;
    uncollapse(deep?: boolean, slotParent?: Component): void;
    appendParentRoot(component: Component, slotName: string): void;
    memAppendParentRoot(component: Component, slotName: string, at: number): void;
    domAppendParentRoot(component: Component, slotName: string, at: number): void;
    postAppendParentRoot(component: Component, slotName: string, at: number): void;
    memPushParentChild(component: Component, slotName: string): void;
    memPullParentChild(component: any, _at: number): void;
    memAppendParentChild(component: Component, slotName: string, at: number, _at: number): void;
    domAppendParentChildAt(component: Component, slotName: string, at: number, _at: number): void;
    postAppendParentChild(component: Component, slotName: string, at: number): void;
    postInsertParentChildAt(component: Component, slotName: string, at: number): void;
    insertParentChildAt(component: Component, slotName: string, i: number): void;
    memInsertParentChildAt(component: Component, slotName: string, i: number): void;
    domInsertParentChildAt(component: Component, slotName: string, i: number): void;
    removeParentChild(component: Component, slotName: string, at: number): void;
    memRemoveParentChildAt(component: Component, slotName: string, at: number, _at: number): void;
    domRemoveParentChildAt(component: Component, slotName: string, at: number, _at: number, slotParent?: Component): void;
    protected domCommitRemoveChild(component: Component): void;
    insertParentRootAt(component: Component, at: number, slotName: string): void;
    memInsertParentRootAt(component: Component, i: number, slotName: string): void;
    domInsertParentRootAt(component: Component, i: number, slotName: string): void;
    postInsertParentRootAt(component: Component, _at: number, slotName: string): void;
    prependParentRoot(component: Component, slotName: string): void;
    removeParentRoot(component: Component, slotParent?: Component): void;
    memRemoveParentRootAt(component: Component, slotName: string, at: number, _at: number): void;
    domRemoveParentRootAt(component: Component, slotName: string, at: number, _at: number, slotParent?: Component): void;
    postRemoveParentRootAt(component: Component, slotName: string, at: number, _at: number): void;
    getSubComponent(id: string): Component;
    setSubComponent(id: string, component: Component): void;
    setSubComponents(component_map: Dict<Component>): void;
    removeSubComponent(id: string): Component;
    getSubComponentParentId(id: string): string | null;
    getSlotSubComponentId(slotName: string): string | null;
    getSubComponentId(subComponent: Component): string | null;
    getParentRootSlotId(subComponent: Component): string | null;
    getSlotPath(slotName: string): string[];
    getPath(): string[];
    addEventListener: (listener: Listener) => Unlisten;
    addEventListeners: (listeners: Listener[]) => Unlisten;
    private _call;
    play(): void;
    pause(): void;
    destroy(): void;
}
