import * as i5 from '@angular/cdk/portal';
import { ComponentType, Portal, CdkPortalOutletAttachedRef } from '@angular/cdk/portal';
import * as i0 from '@angular/core';
import { TemplateRef, ViewContainerRef, StaticProvider, OnInit } from '@angular/core';
import * as i2 from '@acorex/cdk/common';
import { MXBaseComponent, AXComponentClosedPromise } from '@acorex/cdk/common';
import * as i1 from '@angular/common';
import * as i3 from '@angular/cdk/drag-drop';
import * as i4 from '@angular/cdk/a11y';
import * as i6 from '@acorex/components/decorators';
import * as i7 from '@angular/cdk/dialog';
import * as i8 from '@acorex/core/translation';

type AXPopupContentType = TemplateRef<unknown> | ComponentType<unknown>;
type AXPopupSizeType = 'sm' | 'md' | 'lg' | 'full' | 'fit';
interface AXPopupConfig {
    title?: string;
    closeButton?: boolean;
    header?: boolean;
    maximizable?: boolean;
    size?: AXPopupSizeType;
    data?: unknown;
    draggable?: boolean;
    hasBackdrop?: boolean;
    backdropClass?: string;
    closeOnBackdropClick?: boolean;
    viewContainerRef?: ViewContainerRef;
    providers?: StaticProvider[];
    panelClass?: string[];
    direction?: 'rtl' | 'ltr';
}
interface AXPopupData {
    title: string;
    closeButton: boolean;
    header: boolean;
    maximizable: boolean;
    size: AXPopupSizeType;
    data?: unknown;
    draggable: boolean;
    content: AXPopupContentType;
}

/**
 * The Button is a component which detects user interaction and triggers a corresponding event
 *
 * @category Components
 */
declare class AXPopupComponent extends MXBaseComponent implements OnInit {
    private _zone;
    private _viewContainerRef;
    private loadingService;
    private _platform;
    protected data: AXPopupData;
    private dialogRef;
    /**
     * Indicates whether the component is loading.
     * @defaultValue true
     */
    isLoading: boolean;
    /** @ignore */
    private _loadingId;
    /** @ignore */
    protected _selectedPortal: Portal<unknown>;
    /** @ignore */
    protected _footerPortal: Portal<unknown>;
    /** @ignore */
    protected _headerPortal: Portal<unknown>;
    /** @ignore */
    private _componentRef;
    /** @ignore */
    ngOnInit(): void;
    /** @ignore */
    protected _handleAttched(ref: CdkPortalOutletAttachedRef): void;
    /** @ignore */
    onKeydownHandler(event: KeyboardEvent): void;
    /** @ignore */
    protected _handleCloseClick(): void;
    /** @ignore */
    ngOnDestroy(): void;
    /**
     * Sets focus on the `.ax-popup` element within the host element after a short delay.
     */
    focus(): void;
    /**
     * Closes the dialog, emitting component reference, host element, and optional data.
     * @param {unknown} [data]
     */
    close(data?: unknown): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXPopupComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXPopupComponent, "ax-popup", never, {}, {}, never, never, true, never>;
}

declare class AXPopupModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXPopupModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXPopupModule, never, [typeof i1.CommonModule, typeof i2.AXCommonModule, typeof i3.DragDropModule, typeof i4.A11yModule, typeof i5.PortalModule, typeof i6.AXDecoratorModule, typeof i7.DialogModule, typeof i8.AXTranslationModule, typeof AXPopupComponent], [typeof AXPopupComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXPopupModule>;
}

/**
 * This is a service which you can create popup with it
 *
 * @category Components
 */
declare class AXPopupService {
    #private;
    private dialog;
    /**
     *  Open popup 1
     */
    open(content: AXPopupContentType, title: string): AXComponentClosedPromise;
    /**
     *  Open popup 2
     */
    open(content: AXPopupContentType, config?: AXPopupConfig): AXComponentClosedPromise;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXPopupService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXPopupService>;
}

export { AXPopupComponent, AXPopupModule, AXPopupService };
export type { AXPopupConfig, AXPopupContentType, AXPopupData, AXPopupSizeType };
