import * as React from 'react';
import { ViewController } from '../lib/ctr';
import { Application } from './app';
import { Dialog, DialogStack, Options } from '../lib/dialog';
import { Layer, LayerGroup } from '../lib/layer';
export declare enum Type {
    ACTIVITY = 1,
    WIDGET = 2,
    COVER = 3
}
export declare enum CoverType {
    TOP = 0,
    BOTTOM = 1
}
export interface NewWindow<T extends Window> {
    new (args?: any): T;
    type: Type;
}
export interface ActivityOptions extends Options {
    callback?: {
        app: string;
        args?: any;
    };
}
export declare class Window<P = {}, S = {}> extends ViewController<P, S> {
    readonly app: Application;
    readonly id: string;
    constructor(props: any);
    triggerResume(): void;
    triggerPause(): void;
    close(animate?: boolean): Promise<void>;
}
export declare enum ActivityNavStatus {
    BACKGROUND = 1,
    FOREGROUND = 2,
    LEAVE = 3
}
export declare abstract class Activity<P = {}, S = {}> extends Window<P, S> {
    static readonly type: Type;
    private _dialogStack?;
    private _layerGroup?;
    permanent: number;
    navStatus: ActivityNavStatus;
    get preventCover(): boolean;
    get dialogStack(): DialogStack;
    get layerGroup(): LayerGroup;
    protected recoveryState(): void;
    protected triggerRemove(): void;
    exit(rc?: any, animate?: boolean): Promise<void>;
    present(activity: NewWindow<Activity>, args?: ActivityOptions, animate?: boolean): void;
    presentDynamicModule(module: Promise<{
        default: NewWindow<Activity>;
    }>, args?: ActivityOptions, animate?: boolean): void;
    showDialog(D: typeof Dialog, opts?: Options, animate?: boolean): Promise<Dialog>;
    closeDialog(id: typeof Dialog | string, animate?: boolean): void;
    showLayer(L: typeof Layer, opts?: Options, animate?: boolean, delay?: number): Promise<Layer>;
    closeLayer(id: typeof Layer | string, animate?: boolean): void;
    render(): JSX.Element;
    intoBackground(animate: number): Promise<void>;
    intoForeground(animate: number): Promise<void>;
    intoLeave(animate: number): Promise<void>;
    protected abstract renderBody(): React.ReactNode;
}
export declare class Widget<P = {}> extends Window<P> {
    static readonly type = Type.WIDGET;
}
export declare class Cover<P = {}> extends Window<P> {
    static readonly type = Type.COVER;
}
