import { App } from "../App";
import { IAnyInstanceType, IAtomElement, IDisposable, INotifyPropertyChanged, PathList } from "../core/types";
import { AtomDisposableList } from "./AtomDisposableList";
import XNode from "./XNode";
export interface IAtomComponent<T> {
    element: T;
    data: any;
    viewModel: any;
    localViewModel: any;
    app: App;
    setLocalValue(e: T, name: string, value: any): void;
    hasProperty(name: string): any;
    runAfterInit(f: () => void): void;
}
export declare abstract class AtomComponent<T extends IAtomElement, TC extends IAtomComponent<T>> implements IAtomComponent<IAtomElement>, INotifyPropertyChanged {
    readonly app: App;
    static readonly isControl = true;
    readonly disposables: AtomDisposableList;
    readonly element: T;
    protected pendingInits: Array<() => void>;
    private mInvalidated;
    private mPendingPromises;
    private mData;
    get data(): any;
    set data(v: any);
    private mViewModel;
    get viewModel(): any;
    set viewModel(v: any);
    private mLocalViewModel;
    get localViewModel(): any;
    set localViewModel(v: any);
    abstract get parent(): TC;
    /** Do not ever use, only available as intellisense feature for
     * vs code editor.
     */
    get vsProps(): {
        [k in keyof this]?: any;
    } | {
        [k: string]: any;
    } | {};
    private readonly eventHandlers;
    private readonly bindings;
    constructor(app: App, element?: T);
    abstract atomParent(e: T): TC;
    bind(element: T, name: string, path: PathList[], twoWays?: boolean | string[], valueFunc?: (...v: any[]) => any, source?: any): IDisposable;
    /**
     * Remove all bindings associated with given element and optional name
     * @param element T
     * @param name string
     */
    unbind(element: T, name?: string): void;
    bindEvent(element: T, name?: string, method?: EventListenerOrEventListenerObject, key?: string): IDisposable;
    unbindEvent(element: T, name?: string, method?: EventListenerOrEventListenerObject, key?: string): void;
    hasProperty(name: string): boolean;
    /**
     * Use this method if you want to set attribute on HTMLElement immediately but
     * defer atom control property
     * @param element HTMLElement
     * @param name string
     * @param value any
     */
    setPrimitiveValue(element: T, name: string, value: any): void;
    setLocalValue(element: T, name: string, value: any): void;
    dispose(e?: T): void;
    abstract append(element: T | TC): TC;
    onPropertyChanged(name: string): void;
    beginEdit(): IDisposable;
    invalidate(): void;
    onUpdateUI(): void;
    runAfterInit(f: () => void): void;
    registerDisposable(d: IDisposable): IDisposable;
    protected render(node: XNode, e?: any, creator?: any): void;
    protected create(): void;
    protected preCreate(): void;
    protected setElementValue(element: T, name: string, value: any): void;
    protected resolve<TService>(c: TService, selfName?: string | (() => any)): IAnyInstanceType<TService>;
}
//# sourceMappingURL=AtomComponent.d.ts.map