import { App } from "../App";
import { IAtomElement, IClassOf, IDisposable, INotifyPropertyChanged, PathList } from "../core/types";
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;
    readonly element: T;
    protected pendingInits: Array<() => void>;
    private mInvalidated;
    private disposables;
    private mPendingPromises;
    private mData;
    data: any;
    private mViewModel;
    viewModel: any;
    private mLocalViewModel;
    localViewModel: any;
    abstract readonly parent: TC;
    private eventHandlers;
    private 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 create(): void;
    protected preCreate(): void;
    protected setElementValue(element: T, name: string, value: any): void;
    protected resolve<TService>(c: IClassOf<TService>, selfName?: string | (() => any)): TService;
}
//# sourceMappingURL=AtomComponent.d.ts.map