import { System } from '../system';
import { Callback } from '../types/Callback';
import { Dict } from '../types/Dict';
import { Unlisten } from '../types/Unlisten';
import { SelectionObject } from '../types/interface/SEL';
import { $Component } from '../types/interface/async/$Component';
import { $Graph } from '../types/interface/async/$Graph';
import { IOElement } from './IOElement';
import { Listener } from './Listener';
import { RGBA } from './color';
import { Context } from './context';
import { Rect } from './util/geometry/types';
import { Scale } from './util/style/getScale';
export declare const defaultFocusLookup: (component: Component, options?: FocusOptions | undefined) => void;
export declare class Component<E extends IOElement = any, P extends Dict<any> = Dict<any>, U extends $Component | $Graph = any> {
    static id: string;
    $_: string[];
    $element: E;
    $props: P;
    $changed: Set<string>;
    private _$node;
    $system: System;
    $remoteId: string;
    $ref: Dict<Component<any>>;
    private _$context;
    get $context(): Context;
    get $disabled(): boolean;
    $connected: boolean;
    $unit: U;
    $primitive: boolean;
    $propUnlisten: Dict<Unlisten>;
    $unbundled: boolean;
    $controlled: boolean;
    _$disabled: boolean;
    $children: Component[];
    $slotChildren: Dict<Component[]>;
    $slotParentChildren: Dict<Component[]>;
    $slotParentChildOffset: Dict<number[]>;
    $childSlotName: string[];
    $remoteChildren: Component[];
    $domChildren: Component[];
    $slot: Dict<Component>;
    $slotId: Dict<string>;
    $slotTarget: Dict<string>;
    $subComponent: Dict<Component>;
    $root: Component[];
    $wrap: boolean;
    $shadowSlot: HTMLSlotElement;
    $output: Dict<any>;
    $parentRoot: Component[];
    $parentRootSlotName: string[];
    $parentChildren: Component[];
    $parentChildrenSlot: string[];
    $mountRoot: Component[];
    $mountParentRoot: Component[];
    $mountParentChildren: Component[];
    $rootParent: Component;
    $parent: Component | null;
    $slotParent: Component | null;
    $slotParentSlotName: string | null;
    $slotParentSlotIndex: number | null;
    $domParent: Component | null;
    $detachedContext: Context | null;
    $detachedSlotParent: Component | null;
    $attachedChildren: Component[];
    $hostSlot: Component | null;
    $returnIndex: number;
    $mounted: boolean;
    $detached: boolean;
    $moving: boolean;
    private _stopPropagationSet;
    private _stopImmediatePropagationSet;
    private _preventDefaultCounter;
    constructor($props: P, $system: System, $element?: E, $node?: E);
    get $node(): E;
    set $node($node: E);
    getProp<K extends keyof P>(name: K): any;
    setProp<K extends keyof P>(prop: K, data: P[K]): void;
    private _prop_transformer;
    interceptProp<K extends keyof P>(prop: K, transformer: Callback): Unlisten;
    getSlot(slotName: string): Component;
    onPropChanged<K extends keyof P>(prop: K, current: any, prev: 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, id?: string): void;
    stopPropagation(event: string): Unlisten;
    cancelStopPropagation(event: string): void;
    stopImmediatePropagation(event: string): void;
    private _attachTextUnlisten;
    attachText(type: string, text: string): void;
    detachText(type: string): void;
    private _dropTargetUnlisten;
    attachDropTarget(): void;
    detachDropTarget(): void;
    preventDefault(event: string): Unlisten;
    private _addBaseListener;
    private _releasePointerCapture;
    hasPointerCapture(pointerId: number): boolean;
    setPointerCapture(pointerId: number): void;
    releasePointerCapture(pointerId: number): void;
    scroll(opt: ScrollOptions): void;
    scrollIntoView(opt: ScrollIntoViewOptions): void;
    togglePopover(): void;
    hidePopover(): void;
    showPopover(): void;
    private _baseAnimationAbort;
    private _animateBase;
    register(remoteId: string): void;
    unregister(): void;
    isFocusInside(): boolean;
    detach(host: string, opt: {
        animate?: boolean;
        prepend?: boolean;
    }): void;
    attach(opt: {
        animate?: boolean;
    }): void;
    templateLeaves: (leaves: Component[], root: (parent: Component, leafComp: Component) => void, parentRoot: (parent: Component, leafComp: Component) => void, self: (leafComp: Component) => void) => void;
    templateLeaf: (leaf: Component, root: (parent: Component, leafComp: Component) => void, parentRoot: (parent: Component, leafComp: Component) => void, self: (leafComp: Component) => void) => void;
    domRemoveLeaves: (leaves: Component[]) => void;
    domRemoveLeaf: (leaf: Component) => void;
    domAppendBase: (leaves: Component[]) => void;
    mountChild(child: Component, commit?: boolean): void;
    unmountDescendent(child: Component): void;
    private _forAllMountDescendent;
    private _forAllDescendent;
    commit(): void;
    protected _current(name: string): any;
    mount(context: Context, commit?: boolean): void;
    unmount(): void;
    focus(options?: FocusOptions | undefined): void;
    blur(): void;
    deselect(): void;
    containsSelection(): boolean;
    $animationCount: number;
    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;
    getColor(): RGBA;
    getBackgroundColor(): RGBA;
    getFontSize(): number;
    getOpacity(): number;
    getScale(): Scale;
    getTextAlign(): string;
    private _svg_wrapper;
    private _svg_wrapper_mirror;
    private _svg_wrapper_element;
    private _html_wrapper;
    private _svgWrapper;
    private _htmlWrapper;
    isSVG(): boolean;
    isHTML(): boolean;
    isText(): boolean;
    isBase(): boolean;
    getRootBase(path?: string[]): [string[], Component][];
    getRootLeaves(path?: string[]): Component[];
    getFirstRootLeaf(): Component;
    getBase(path?: string[]): [string[], Component][];
    pathGetSubComponent(path: string[]): Component;
    getRect(): Rect;
    getBoundingClientRect(): Rect;
    getSelection(): SelectionObject[];
    setSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none' | undefined): void;
    appendChild(child: Component, slotName?: string): number;
    insertChild(child: Component, slotName: string, at: number): number;
    appendChildren(children: Component[], slotName: string): void;
    memAppendChildren(children: Component[], slotName: string): void;
    postAppendChildren(children: Component[], slotName: string): void;
    memAppendChild(child: Component, slotName: string, at: number): void;
    memInsertChild(child: Component, slotName: string, at: number): void;
    domAppendChildren(children: Component[], slotName: string): void;
    getLeafSlot(slotName: string): Component<any, Dict<any>, any>;
    protected setSlotParent(slotParent: Component, slotName: string, at: number): void;
    private _domAppendChild;
    private _domInsertChild;
    domAppendChild(child: Component, slotName: string, at: number): void;
    domInsertChild(child: Component, slotName: string, at: number): void;
    postAppendChild(child: Component, slotName: string, at: number): void;
    postInsertChild(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): Unlisten;
    _connect($unit: U, deep?: boolean): void;
    private _instanceChild;
    private $control;
    reorderSubComponent(parentId: string, childId: string, to: number): void;
    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;
    placeRootAt(component: Component, at: number): void;
    pullRoot(component: Component): void;
    fitRoot(component: Component, at: number): void;
    registerRoot(component: Component, at?: number): void;
    registerRootAt(component: Component, at: number): void;
    unregisterRoot(component: Component): void;
    memAppendRoot(component: Component): void;
    postAppendRoot(component: Component): void;
    domAppendRoot(component: Component, at: number, index: number): void;
    isParent: () => boolean;
    protected _insertAt(parent: Component, child: Component, at: number): void;
    protected _insertAt_: any;
    protected _removeChild_: any;
    private _svg_wrapper_unlisten;
    $wrapElement: HTMLElement | SVGElement;
    private _svg_view_box_resize;
    private _wrapElement;
    private _unwrapElement;
    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;
    placeParentRoot(component: Component, at: number, slotName: string): void;
    unshiftParentRoot(component: Component, slotName: string): void;
    pullParentRoot(component: Component): void;
    registerParentRoot(component: Component, slotName?: string, at?: number): void;
    unregisterParentRoot(component: Component): void;
    collapse(deep?: boolean): void;
    uncollapse(deep?: boolean): 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;
    memInsertParentChild(component: Component, at: number, slotName: string): void;
    memPullParentChild(component: Component): void;
    memAppendParentChild(component: Component, slotName: string, at: number, _at: number): void;
    postAppendParentChild(component: Component, slotName: string, at: number): void;
    postInsertParentChild(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;
    private _incrementParentChildOffset;
    private _decrementParentChildOffset;
    domInsertParentChildAt(component: Component, slotName: string, at: number): void;
    _domInsertParentChildAt(component: Component, slotName: string, at: number): void;
    removeParentChild(component: Component, slotName: string, at: number): void;
    memRemoveParentChildAt(component: Component, slotName: string, at: number): void;
    domRemoveParentChildAt(component: Component, slotName: string, at: number): void;
    private _domRemoveParentChildAt;
    protected domCommitRemoveChild(component: Component, at: number): void;
    protected _removeChild(child: 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): void;
    memRemoveParentRoot(component: Component): void;
    memRemoveParentRootAt(component: Component, slotName: string, at: number): void;
    domRemoveParentRootAt(component: Component, slotName: string, at: number): void;
    postRemoveParentRootAt(component: Component, slotName: string, at: number): void;
    getSubComponent(id: string): Component;
    setControlled(controlled: boolean, deep?: boolean): void;
    setDisabled(disabled: boolean): void;
    setSystem(system: System): void;
    setDetached(detached: boolean): void;
    setSubComponent(id: string, component: Component): void;
    setSubComponents(component_map: Dict<Component>): void;
    decoupleSubComponent(id: string): void;
    removeSubComponent(id: string): Component;
    getSubComponentParentId(id: string): string | null;
    getSubComponentParent(id: string): Component | 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;
    click(): void;
    private _call;
    reset(): void;
    play(): void;
    pause(): void;
    destroy(): void;
}
