import { AjaxOptions } from "../services/http/AjaxOptions";
import { IAtomElement, IDisposable, IUIAtomControl } from "./types";
import XNode from "./XNode";
export declare abstract class BaseElementBridge<T extends IAtomElement> {
    controlFactory: any;
    createBusyIndicator: () => IDisposable;
    ajax: (url: string, options: AjaxOptions, success: (r: any) => void, failed: (r: any) => void, progress: (p: any) => void) => void;
    reset: () => void;
    abstract create(type: string | ((n: any, ...nodes: XNode[]) => XNode) | (new (...a: any[]) => any), node?: any, app?: any): T;
    abstract attachControl(element: T, control: IUIAtomControl): void;
    abstract addEventHandler(element: T, name: string, handler: EventListenerOrEventListenerObject, capture?: boolean): IDisposable;
    abstract atomParent(element: T, climbUp?: boolean): IUIAtomControl;
    abstract elementParent(element: T): T;
    abstract templateParent(element: T): IUIAtomControl;
    abstract visitDescendents(element: T, action: (e: T, ac: IUIAtomControl) => boolean): void;
    abstract dispose(element: T): void;
    abstract appendChild(parent: T, child: T): void;
    abstract getValue(element: HTMLElement, name: string): any;
    abstract setValue(element: T, name: string, value: any): void;
    abstract watchProperty(element: T, name: string, events: string[], f: (v: any) => void): IDisposable;
    abstract loadContent(element: T, text: string): void;
    abstract findChild(element: T, name: string): T;
    abstract close(element: T, success: () => void, error: (e: any) => void): void;
    refreshInherited(target: {
        element: T;
    }, name: string, fieldName?: string): void;
    createNode(target: any, node: XNode, binder: Function, xNodeClass: Function, creator: Function): any;
}
export declare class AtomElementBridge extends BaseElementBridge<HTMLElement> {
    addEventHandler(element: HTMLElement, name: string, handler: EventListenerOrEventListenerObject, capture?: boolean): IDisposable;
    atomParent(element: HTMLElement, climbUp?: boolean): IUIAtomControl;
    elementParent(element: HTMLElement): HTMLElement;
    templateParent(element: HTMLElement): IUIAtomControl;
    visitDescendents(element: HTMLElement, action: (e: HTMLElement, ac: IUIAtomControl) => boolean): void;
    dispose(element: HTMLElement): void;
    appendChild(parent: HTMLElement, child: HTMLElement): void;
    setValue(element: HTMLElement, name: string, value: any): void;
    getValue(element: HTMLElement, name: string): any;
    watchProperty(element: HTMLElement, name: string, events: string[], f: (v: any) => void): IDisposable;
    attachControl(element: HTMLElement, control: IUIAtomControl): void;
    create(type: string): HTMLElement;
    loadContent(element: HTMLElement, text: string): void;
    findChild(element: HTMLElement, name: string): HTMLElement;
    close(element: HTMLElement, success: () => void, error: (e: any) => void): void;
    toTemplate(element: any, creator: any): any;
    createNode(target: any, node: XNode, binder: Function, xNodeClass: Function, creator: Function): any;
}
export declare class AtomBridge {
    static platform: "web" | "xf";
    static instance: BaseElementBridge<IAtomElement>;
    static createNode(iterator: XNode, app: any): {
        element?: any;
        control?: any;
    };
    static toTemplate(app: any, n: XNode, creator: any): any;
    static refreshInherited(target: {
        element: any;
    }, name: string, fieldName?: string): void;
}
//# sourceMappingURL=AtomBridge.d.ts.map