import * as i2 from '@acorex/cdk/common';
import { AXStyleColorType, AXStyleLookType, AXHotKeyAction, MXBaseComponent } from '@acorex/cdk/common';
import * as i0 from '@angular/core';
import * as i1 from '@angular/common';
import * as i3 from '@angular/cdk/drag-drop';
import * as i4 from '@angular/cdk/a11y';
import * as i5 from '@acorex/components/button';
import * as i6 from '@acorex/components/decorators';
import * as i7 from '@acorex/components/loading';
import * as i8 from '@angular/cdk/dialog';
import * as i9 from '@acorex/core/translation';

interface AXDialogButtonItem {
    text: string;
    color?: AXStyleColorType;
    look?: AXStyleLookType;
    name?: string;
    disabled?: boolean;
    loading?: boolean;
    hotkey?: string | AXHotKeyAction;
    autofocus?: boolean;
    onClick?: (e?: {
        source: AXDialogButtonItem;
        handled?: boolean;
    }) => void;
}
interface AXDialogConfig {
    title: string;
    content: string;
    type: AXStyleColorType;
    buttons: AXDialogButtonItem[];
    closeButton?: boolean;
    orientation?: 'horizontal' | 'vertical';
    icon?: string | 'none';
    draggable?: boolean;
    direction?: 'rtl' | 'ltr';
}
interface AXDialogRef {
    close(): void;
}
interface AXDialogData {
    title: string;
    content: string;
    type: AXStyleColorType;
    buttons: AXDialogButtonItem[];
    closeButton: boolean;
    orientation: 'horizontal' | 'vertical';
    icon?: string | 'none';
    draggable?: boolean;
}

/**
 * A dialog component that provides a modal interface for user interactions.
 * @category Components
 */
declare class AXDialogComponent extends MXBaseComponent {
    protected data: AXDialogData;
    private dialogRef;
    /**
     *  @ignore
     */
    protected _icon: string;
    /**
     *  @ignore
     */
    protected _handleButtonClick(button: AXDialogButtonItem): void;
    /**
     *  @ignore
     */
    protected _hasAutoFocus(button: AXDialogButtonItem): boolean;
    /**
     * Closes the dialog.
     *
     * @returns void - No return value. The dialog is closed and removed from the DOM.
     */
    close(): void;
    /**
     *  @ignore
     */
    get tabIndex(): string;
    /** @ignore */
    private get __hostClass();
    static ɵfac: i0.ɵɵFactoryDeclaration<AXDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXDialogComponent, "ax-dialog", never, {}, {}, never, never, true, never>;
}

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

/**
 * The Button is a component which detects user interaction and triggers a corresponding event
 *
 * @category Components
 */
declare class AXDialogService {
    private dialog;
    private defaultConfig;
    private detectIcon;
    /**
     * Show an alert box with 'Okay' button.
     *
     * @param title - The title of the alert dialog.
     * @param content - The content message of the alert dialog.
     * @param type - The type/color of the alert (primary, success, warning, danger).
     * @param orientation - The orientation of the dialog (horizontal or vertical).
     * @param draggable - Whether the dialog can be dragged.
     * @returns Promise<void> - Promise that resolves when the dialog is closed.
     */
    alert(title: string, content: string, type?: AXStyleColorType, orientation?: 'horizontal' | 'vertical', draggable?: boolean): Promise<void>;
    /**
     * Show a confirm box with 'Okay' & 'Cancel' buttons.
     *
     * @param title - The title of the confirm dialog.
     * @param content - The content message of the confirm dialog.
     * @param type - The type/color of the confirm dialog (primary, success, warning, danger).
     * @param orientation - The orientation of the dialog (horizontal or vertical).
     * @param draggable - Whether the dialog can be dragged.
     * @param defaultAction - The default action to focus (confirm or cancel).
     * @returns Promise<{ result: boolean }> - Promise that resolves with the user's choice.
     */
    confirm(title: string, content: string, type?: AXStyleColorType, orientation?: 'horizontal' | 'vertical', draggable?: boolean, defaultAction?: 'confirm' | 'cancel'): Promise<{
        result: boolean;
    }>;
    /**
     * Show a custom dialog box.
     *
     * @param options - Configuration options for the custom dialog.
     * @returns Promise<{ name: string }> - Promise that resolves with the button name that was clicked.
     */
    show(options: AXDialogConfig): Promise<{
        name: string;
    }>;
    /**
     * Show a custom dialog box.
     *
     * @param options - Configuration options for the custom dialog.
     * @returns Promise<{ name: string }> - Promise that resolves with the button name that was clicked.
     */
    open(config: AXDialogConfig): AXDialogRef;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXDialogService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXDialogService>;
}

export { AXDialogComponent, AXDialogModule, AXDialogService };
export type { AXDialogButtonItem, AXDialogConfig, AXDialogData, AXDialogRef };
