import './util.css';
import './dialog.css';
import { ViewController } from './ctr';
import * as React from 'react';
import { EventNoticer, Event } from 'somes/event';
import { Activity } from '../isolate/ctr';
import { InputProps, Input } from './keyboard';
export declare function getDefaultId(obj: any): string;
export interface Options extends Dict {
    id?: string;
}
export declare class DialogStack {
    private _dialogStack;
    private _IDs;
    private _panel;
    constructor(panel?: HTMLElement);
    get preventCover(): boolean;
    show(D: typeof Dialog, opts?: Options, animate?: boolean, act?: Activity): Promise<Dialog<{}>>;
    close(id: typeof Dialog | string, animate?: boolean): void;
    closeAll(): void;
}
export declare abstract class Dialog<P = {}> extends ViewController<P> {
    readonly onClose: EventNoticer<Event<any, Dialog<{}>>>;
    private __activity?;
    private __panel?;
    get preventCover(): boolean;
    get activity(): Activity<{}, {}> | undefined;
    private _maskClick;
    protected triggerMaskClick(): void;
    render(): JSX.Element;
    private _enableAnimate;
    hide(animate?: boolean): Promise<void>;
    show(animate?: boolean): Promise<void>;
    close(animate?: boolean): Promise<void>;
    get noMask(): boolean;
    protected abstract renderBody(): React.ReactNode;
    static get globaDialogStack(): DialogStack;
}
export interface DefaultOptions extends Options {
    title?: React.ReactNode;
    text?: React.ReactNode;
    buttons?: Dict<(e: any) => void>;
    prompt?: {
        type?: string;
        value?: string;
        input?: InputConstructor;
        placeholder?: string;
    };
    noMask?: boolean;
}
export default class DefaultDialog extends Dialog<DefaultOptions> {
    protected triggerMounted(): void;
    private _handleClick_1;
    get noMask(): boolean;
    protected renderButtons(): JSX.Element[];
    protected renderBody(): JSX.Element;
    static setScale(scale: number): void;
    static get scale(): number;
    static show(opts: DefaultOptions, stack?: DialogStack): Promise<Dialog<{}>>;
    static alert(In: DialogIn, cb?: () => void, stack?: DialogStack): Promise<Dialog<{}>>;
    static confirm(In: DialogIn, cb?: (ok: boolean) => void, stack?: DialogStack): Promise<Dialog<{}>>;
    static prompt(In: PromptIn, cb?: (value: string, ok: boolean) => void, stack?: DialogStack): Promise<Dialog<{}>>;
}
export declare type DialogIn = string | {
    text?: React.ReactNode;
    title?: React.ReactNode;
    id?: string;
};
export interface InputConstructor {
    new (props: InputProps): Input;
}
export declare type PromptIn = string | {
    text?: React.ReactNode;
    title?: React.ReactNode;
    value?: string;
    type?: string;
    input?: InputConstructor;
    placeholder?: string;
    id?: string;
};
export declare function show(opts: DefaultOptions, stack?: DialogStack): Promise<Dialog<{}>>;
export declare function alert(In: DialogIn, cb?: () => void, stack?: DialogStack): Promise<Dialog<{}>>;
export declare function confirm(In: DialogIn, cb?: (ok: boolean) => void, stack?: DialogStack): Promise<Dialog<{}>>;
export declare function prompt(In: PromptIn, cb?: (value: string, ok: boolean) => void, stack?: DialogStack): Promise<Dialog<{}>>;
