import { AtomDispatcher } from "./core/AtomDispatcher";
import { AtomUri } from "./core/AtomUri";
import { IScreen } from "./core/IScreen";
import { IDisposable } from "./core/types";
import { ServiceProvider } from "./di/ServiceProvider";
export declare type AtomAction = (channel: string, data: any) => void;
export declare class AtomMessageAction {
    message: string;
    action: AtomAction;
    constructor(msg: string, a: AtomAction);
}
export declare class App extends ServiceProvider {
    readonly dispatcher: AtomDispatcher;
    readonly screen: IScreen;
    /**
     * This must be set explicitly as it can be used outside to detect
     * if app is ready. This will not be set automatically by framework.
     */
    appReady: boolean;
    private bag;
    private busyIndicators;
    private busyIndicatorService;
    private readyHandlers;
    private mUrl;
    get url(): AtomUri;
    set url(v: AtomUri);
    get contextId(): string;
    constructor();
    createBusyIndicator(): IDisposable;
    syncUrl(): void;
    callLater(f: () => void): void;
    waitForPendingCalls(): Promise<any>;
    /**
     * This method will run any asynchronous method
     * and it will display an error if it will fail
     * asynchronously
     *
     * @template T
     * @param {() => Promise<T>} tf
     * @memberof AtomDevice
     */
    runAsync<T>(tf: () => Promise<T>): void;
    onError: (m: any) => void;
    /**
     * Broadcast given data to channel, only within the current window.
     *
     * @param {string} channel
     * @param {*} data
     * @returns
     * @memberof AtomDevice
     */
    broadcast(channel: string, data: any): void;
    /**
     * Subscribe for given channel with action that will be
     * executed when anyone will broadcast (this only works within the
     * current browser window)
     *
     * This method returns a disposable, when you call `.dispose()` it will
     * unsubscribe for current subscription
     *
     * @param {string} channel
     * @param {AtomAction} action
     * @returns {AtomDisposable} Disposable that supports removal of subscription
     * @memberof AtomDevice
     */
    subscribe(channel: string, action: AtomAction): IDisposable;
    main(): void;
    protected onReady(f: () => any): void;
    protected invokeReady(): void;
    private invokeReadyHandler;
}
//# sourceMappingURL=App.d.ts.map