import { AXStyleColorType, AXStyleLookType, AXHotKeyAction, MXBaseComponent } from '@acorex/cdk/common';
import { AXDialogButtonItem } from '@acorex/components/dialog';
import { AXProgressMode } from '@acorex/components/progress-bar';
import * as i0 from '@angular/core';
import { WritableSignal } from '@angular/core';

interface AXLoadingDialogConfig {
    title: string;
    mode: AXProgressMode;
    status?: string;
    text?: string;
    progressValue?: number;
    progressColor?: AXStyleColorType;
    progressHeight?: number;
    buttons?: AXLoadingDialogButtonItem[];
}
interface AXLoadingDialogButtonItem {
    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 AXDialogRef {
    close(): void;
    setProgressValue(value: number): any;
    setProgressText(text: string): any;
    setDialogTitle(text: string): any;
    setProgressColor(color: AXStyleColorType): any;
    setProgressStatus(status: string): any;
}

/**
 * Represents a loading dialog component with custom styles and encapsulation.
 * @category components
 */
declare class AXLoadingDialogComponent extends MXBaseComponent {
    data: AXLoadingDialogConfig;
    private dialogRef;
    /** @ignore */
    protected progressText: WritableSignal<string>;
    /** @ignore */
    protected progressStatus: WritableSignal<string>;
    /** @ignore */
    protected progressColor: WritableSignal<AXStyleColorType>;
    /** @ignore */
    protected dialogTitle: WritableSignal<string>;
    /** @ignore */
    protected progressValue: WritableSignal<number>;
    /**
     * Closes the loading dialog.
     *
     * @returns void - No return value. The dialog is closed and control returns to the caller.
     */
    close(): void;
    /**
     * Sets the displayed progress text inside the dialog.
     *
     * @param text The text to display under the progress bar.
     * @returns void
     */
    setProgressText(text: string): void;
    /**
     * Sets the status text, typically representing the current step out of total steps (e.g., "5/10").
     *
     * @param status The status text to display.
     * @returns void
     */
    setProgressStatus(status: string): void;
    /**
     * Sets the color used by the progress indicator.
     *
     * @param color The color token to apply to the progress UI.
     * @returns void
     */
    setProgressColor(color: AXStyleColorType): void;
    /**
     * Sets the dialog title text.
     *
     * @param text The title text to display at the top of the dialog.
     * @returns void
     */
    setDialogTitle(text: string): void;
    /**
     * Sets the numeric progress value.
     *
     * @param value A number in the range 0–100 representing the current progress.
     * @returns void
     */
    setProgressValue(value: number): void;
    /** @ignore */
    protected _handleButtonClick(button: AXLoadingDialogButtonItem): void;
    /** @ignore */
    protected _hasAutoFocus(button: AXLoadingDialogButtonItem): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXLoadingDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AXLoadingDialogComponent, "ax-loading-dialog", never, {}, {}, never, never, true, never>;
}

declare class AXLoadingDialogModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<AXLoadingDialogModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<AXLoadingDialogModule, never, [typeof AXLoadingDialogComponent], [typeof AXLoadingDialogComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<AXLoadingDialogModule>;
}

declare class AXLoadingDialogService {
    private dialog;
    /**
     * Opens a loading dialog with the specified configuration.
     *
     * @param options Configuration for the loading dialog, including title, progress mode, and optional initial values.
     * @returns AXDialogRef - A reference with helper methods to control the dialog lifecycle and UI (close, setProgressValue, setProgressText, setDialogTitle, setProgressColor, setProgressStatus).
     */
    show(options: AXLoadingDialogConfig): AXDialogRef;
    static ɵfac: i0.ɵɵFactoryDeclaration<AXLoadingDialogService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<AXLoadingDialogService>;
}

export { AXLoadingDialogComponent, AXLoadingDialogModule, AXLoadingDialogService };
export type { AXDialogRef, AXLoadingDialogButtonItem, AXLoadingDialogConfig };
