import { OverlayRef } from '@angular/cdk/overlay';
import { EventEmitter, Injector, TemplateRef, Type } from '@angular/core';
export type OnClickCallback<T> = (instance: T) => (false | void | {}) | Promise<false | void | {}>;
export type ModalType = 'default' | 'confirm' | 'custom';
export type ConfirmType = 'confirm' | 'success' | 'warn';
export declare enum ModalSize {
    Small = "small",
    Medium = "medium",
    Large = "large"
}
export interface ModalOptions<C = any, R = any> {
    kbqModalType?: ModalType;
    kbqVisible?: boolean;
    kbqWidth?: number | string;
    kbqSize?: ModalSize;
    kbqWrapClassName?: string;
    kbqClassName?: string;
    kbqStyle?: object;
    kbqTitle?: string | TemplateRef<{}>;
    kbqContent?: string | TemplateRef<{}> | Type<C>;
    kbqComponent?: Type<C>;
    /** @deprecated. Use field data and KBQ_MODAL_DATA */
    kbqComponentParams?: any;
    kbqClosable?: boolean;
    kbqMask?: boolean;
    kbqMaskClosable?: boolean;
    kbqMaskStyle?: object;
    kbqBodyStyle?: object;
    kbqFooter?: string | TemplateRef<{}> | IModalButtonOptions<C>[];
    kbqGetContainer?: HTMLElement | OverlayRef | (() => HTMLElement | OverlayRef) | null;
    kbqAfterOpen?: EventEmitter<void>;
    kbqAfterClose?: EventEmitter<R>;
    kbqCloseByESC?: boolean;
    kbqRestoreFocus?: boolean;
    kbqOkText?: string;
    kbqOkType?: string;
    kbqOkLoading?: boolean;
    kbqOnOk?: EventEmitter<C> | OnClickCallback<C>;
    kbqCancelText?: string;
    kbqCancelLoading?: boolean;
    kbqOnCancel?: EventEmitter<C> | OnClickCallback<C>;
    /** Data being injected into the child component. */
    data?: any;
}
export interface IModalOptionsForService<T = any> extends ModalOptions<T> {
    kbqOnOk?: OnClickCallback<T>;
    kbqOnCancel?: OnClickCallback<T>;
    /**
     * The injector used to create the component that will be attached.
     * If specified, it overrides the injector provided by `KbqModalService`.
     */
    injector?: Injector;
}
export interface IModalButtonOptions<T = any> {
    label: string;
    type?: string;
    shape?: string;
    ghost?: boolean;
    size?: string;
    autoLoading?: boolean;
    show?: boolean | ((this: IModalButtonOptions<T>, contentComponentInstance?: T) => boolean);
    loading?: boolean | ((this: IModalButtonOptions<T>, contentComponentInstance?: T) => boolean);
    disabled?: boolean | ((this: IModalButtonOptions<T>, contentComponentInstance?: T) => boolean);
    autoFocus?: boolean;
    kbqModalMainAction?: boolean;
    onClick?(this: IModalButtonOptions<T>, contentComponentInstance?: T): (void | {}) | Promise<void | {}>;
}
