import { FocusMonitor } from '@angular/cdk/a11y';
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, Renderer2, SimpleChanges, TemplateRef, Type, ViewContainerRef } from '@angular/core';
import { KbqComponentColors } from '@koobiq/components/core';
import { Observable } from 'rxjs';
import { KbqModalControlService } from './modal-control.service';
import { KbqModalRef } from './modal-ref.class';
import { IModalButtonOptions, ModalOptions, ModalSize, ModalType, OnClickCallback } from './modal.type';
import * as i0 from "@angular/core";
/**
 * Duration when perform animations (ms)
 * @docs-private
 */
export declare const MODAL_ANIMATE_DURATION = 200;
export declare class KbqModalComponent<T = any, R = any> extends KbqModalRef<T, R> implements OnInit, OnChanges, AfterViewInit, OnDestroy, ModalOptions {
    private overlay;
    private renderer;
    private cfr;
    private elementRef;
    private viewContainer;
    private modalControl;
    private changeDetector;
    private focusMonitor;
    protected readonly document: Document;
    componentColors: typeof KbqComponentColors;
    kbqModalType: ModalType;
    kbqComponent: Type<T>;
    kbqContent: string | TemplateRef<{}> | Type<T>;
    kbqComponentParams: any;
    kbqFooter: string | TemplateRef<{}> | IModalButtonOptions<T>[];
    get kbqVisible(): boolean;
    set kbqVisible(value: boolean);
    private _kbqVisible;
    readonly kbqVisibleChange: EventEmitter<boolean>;
    kbqWidth: number | string;
    kbqSize: ModalSize;
    kbqWrapClassName: string;
    kbqClassName: string;
    kbqStyle: object;
    kbqTitle: string | TemplateRef<{}>;
    kbqCloseByESC: boolean;
    get kbqClosable(): boolean;
    set kbqClosable(value: boolean);
    private _kbqClosable;
    get kbqMask(): boolean;
    set kbqMask(value: boolean);
    private _kbqMask;
    get kbqMaskClosable(): boolean;
    set kbqMaskClosable(value: boolean);
    private _kbqMaskClosable;
    kbqMaskStyle: object;
    kbqBodyStyle: object;
    readonly kbqAfterOpen: EventEmitter<void>;
    readonly kbqAfterClose: EventEmitter<R | undefined>;
    kbqOkText: string;
    kbqOkType: KbqComponentColors;
    kbqRestoreFocus: boolean;
    get kbqOkLoading(): boolean;
    set kbqOkLoading(value: boolean);
    private _kbqOkLoading;
    readonly kbqOnOk: EventEmitter<T> | OnClickCallback<T>;
    kbqCancelText: string;
    get kbqCancelLoading(): boolean;
    set kbqCancelLoading(value: boolean);
    private _kbqCancelLoading;
    readonly kbqOnCancel: EventEmitter<T> | OnClickCallback<T>;
    modalContainer: ElementRef;
    bodyContainer: ViewContainerRef;
    autoFocusedButtons: QueryList<ElementRef>;
    modalBody: ElementRef;
    isTopOverflow: boolean;
    isBottomOverflow: boolean;
    maskAnimationClassMap: object;
    modalAnimationClassMap: object;
    transformOrigin: string;
    get afterOpen(): Observable<void>;
    get afterClose(): Observable<R | undefined>;
    get okText(): string;
    get cancelText(): string;
    get hidden(): boolean;
    private focusedElementBeforeOpen;
    private previouslyFocusedElementOrigin;
    private contentComponentRef;
    private animationState;
    private container;
    constructor(overlay: Overlay, renderer: Renderer2, cfr: ComponentFactoryResolver, elementRef: ElementRef<HTMLElement>, viewContainer: ViewContainerRef, modalControl: KbqModalControlService, changeDetector: ChangeDetectorRef, focusMonitor: FocusMonitor);
    kbqGetContainer: HTMLElement | OverlayRef | (() => HTMLElement | OverlayRef);
    ngOnChanges(changes: SimpleChanges): void;
    ngOnInit(): void;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    checkOverflow(): void;
    open(): void;
    close(result?: R): void;
    destroy(result?: R): void;
    markForCheck(): void;
    triggerOk(): void;
    triggerCancel(): void;
    getInstance(): KbqModalComponent;
    getContentComponentRef(): ComponentRef<T>;
    getContentComponent(): T;
    getElement(): HTMLElement;
    getKbqFooter(): HTMLElement;
    onClickMask($event: MouseEvent): void;
    isModalType(type: ModalType): boolean;
    onKeyDown(event: KeyboardEvent): void;
    onClickCloseBtn(): void;
    onClickOkCancel(type: 'ok' | 'cancel'): void;
    handleCloseResult(triggerType: 'ok' | 'cancel', canClose: (doClose: boolean | void | {}) => boolean): void;
    isNonEmptyString(value: {}): boolean;
    isTemplateRef(value: {}): boolean;
    isComponent(value: {}): boolean;
    isModalButtons(value: {}): boolean;
    getButtonCallableProp(options: IModalButtonOptions<T>, prop: string): {};
    onButtonClick(button: IModalButtonOptions<T>): void;
    private handleVisibleStateChange;
    private changeVisibleFromInside;
    private changeAnimationState;
    private animateTo;
    private formatModalButtons;
    /**
     * Create a component dynamically but not attach to any View
     * (this action will be executed when bodyContainer is ready)
     * @param component Component class
     */
    private createDynamicComponent;
    private updateTransformOrigin;
    /**
     * Take care of the body's overflow to decide the existence of scrollbar
     * @param plusNum The number that the openModals.length will increase soon
     */
    private changeBodyOverflow;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqModalComponent<any, any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqModalComponent<any, any>, "kbq-modal", never, { "kbqModalType": { "alias": "kbqModalType"; "required": false; }; "kbqComponent": { "alias": "kbqComponent"; "required": false; }; "kbqContent": { "alias": "kbqContent"; "required": false; }; "kbqComponentParams": { "alias": "kbqComponentParams"; "required": false; }; "kbqFooter": { "alias": "kbqFooter"; "required": false; }; "kbqVisible": { "alias": "kbqVisible"; "required": false; }; "kbqWidth": { "alias": "kbqWidth"; "required": false; }; "kbqSize": { "alias": "kbqSize"; "required": false; }; "kbqWrapClassName": { "alias": "kbqWrapClassName"; "required": false; }; "kbqClassName": { "alias": "kbqClassName"; "required": false; }; "kbqStyle": { "alias": "kbqStyle"; "required": false; }; "kbqTitle": { "alias": "kbqTitle"; "required": false; }; "kbqCloseByESC": { "alias": "kbqCloseByESC"; "required": false; }; "kbqClosable": { "alias": "kbqClosable"; "required": false; }; "kbqMask": { "alias": "kbqMask"; "required": false; }; "kbqMaskClosable": { "alias": "kbqMaskClosable"; "required": false; }; "kbqMaskStyle": { "alias": "kbqMaskStyle"; "required": false; }; "kbqBodyStyle": { "alias": "kbqBodyStyle"; "required": false; }; "kbqOkText": { "alias": "kbqOkText"; "required": false; }; "kbqOkType": { "alias": "kbqOkType"; "required": false; }; "kbqRestoreFocus": { "alias": "kbqRestoreFocus"; "required": false; }; "kbqOkLoading": { "alias": "kbqOkLoading"; "required": false; }; "kbqOnOk": { "alias": "kbqOnOk"; "required": false; }; "kbqCancelText": { "alias": "kbqCancelText"; "required": false; }; "kbqCancelLoading": { "alias": "kbqCancelLoading"; "required": false; }; "kbqOnCancel": { "alias": "kbqOnCancel"; "required": false; }; "kbqGetContainer": { "alias": "kbqGetContainer"; "required": false; }; }, { "kbqVisibleChange": "kbqVisibleChange"; "kbqAfterOpen": "kbqAfterOpen"; "kbqAfterClose": "kbqAfterClose"; "kbqOnOk": "kbqOnOk"; "kbqOnCancel": "kbqOnCancel"; }, never, ["*"], false, never>;
}
