import { AXStyleColorType, AXStyleLookType, AXHotKeyAction, MXBaseComponent } from '@acorex/cdk/common';
import { AXOverlayRef } from '@acorex/cdk/overlay';
import { AXDialogButtonItem } from '@acorex/components/dialog';
import { AXProgressMode } from '@acorex/components/progress-bar';
import * as _angular_core from '@angular/core';
import { OnInit } 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 AXLoadingDialogRef {
    close(): void;
    setProgressValue(value: number): void;
    setProgressText(text: string): void;
    setDialogTitle(text: string): void;
    setProgressColor(color: AXStyleColorType): void;
    setProgressStatus(status: string): void;
}
/**
 * @deprecated Use AXLoadingDialogRef instead
 */
type AXDialogRef = AXLoadingDialogRef;
/**
 * @internal
 * Internal reference used by loading dialog service to manage overlay instances
 */
interface AXLoadingDialogInternalRef {
    overlayRef: AXOverlayRef<unknown>;
    close: () => void;
}

/**
 * Represents a loading dialog component with custom styles and encapsulation.
 * @category components
 */
declare class AXLoadingDialogComponent extends MXBaseComponent implements OnInit {
    /** Loading dialog configuration data */
    data: _angular_core.InputSignal<AXLoadingDialogConfig>;
    /** @internal Callback function to close the dialog */
    onClose: _angular_core.InputSignal<() => void>;
    /** @ignore */
    protected progressText: _angular_core.WritableSignal<string>;
    /** @ignore */
    protected progressStatus: _angular_core.WritableSignal<string>;
    /** @ignore */
    protected progressColor: _angular_core.WritableSignal<AXStyleColorType>;
    /** @ignore */
    protected dialogTitle: _angular_core.WritableSignal<string>;
    /** @ignore */
    protected progressValue: _angular_core.WritableSignal<number>;
    ngOnInit(): void;
    /**
     * 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: _angular_core.ɵɵFactoryDeclaration<AXLoadingDialogComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLoadingDialogComponent, "ax-loading-dialog", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "onClose": { "alias": "onClose"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

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

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

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