import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
import { AlertVariant } from '../../../../types/src/alert';
import { CSSResultGroup } from 'lit';
import { default as CxIconButton } from '../icon-button/icon-button';

/**
 * @summary Alerts are used to display important messages inline or as toast notifications.
 * @status stable
 * @since 2.0
 *
 * @slot (default) - The alert's main content.
 * @slot icon - An icon to show in the alert. Works best with `<cx-icon>`.
 *
 * @event cx-show - Emitted when the alert opens.
 * @event cx-after-show - Emitted after the alert opens and all animations are complete.
 * @event cx-hide - Emitted when the alert closes.
 * @event cx-after-hide - Emitted after the alert closes and all animations are complete.
 *
 * @animation alert.show - The animation to use when showing the alert.
 * @animation alert.hide - The animation to use when hiding the alert.
 *
 * @csspart base - The component’s base wrapper.
 * @csspart icon - The container that wraps the optional icon.
 * @csspart message - The container that wraps the alert’s main content.
 * @csspart close-button - The close button, an "cx-icon-button"
 * @csspart close-button__base - The close button’s exported "base" part.
 */
export default class CxAlert extends CortexElement {
    static styles: CSSResultGroup;
    static dependencies: {
        'cx-icon-button': typeof CxIconButton;
    };
    private autoHideTimeout;
    private remainingTimeInterval;
    private countdownAnimation?;
    private readonly hasSlotController;
    private readonly localize;
    base: HTMLElement;
    countdownElement: HTMLElement;
    /**
     * Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can
     * use the `show()` and `hide()` methods and this attribute will reflect the alert's open state.
     */
    open: boolean;
    /** Enables a close button that allows the user to dismiss the alert. */
    closable: boolean;
    /** The alert's theme variant. */
    variant: AlertVariant;
    /**
     * The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with
     * the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning
     * the alert will not close on its own.
     */
    duration: number;
    /**
     * Enables a countdown that indicates the remaining time the alert will be displayed.
     * Typically used to indicate the remaining time before a whole app refresh.
     */
    countdown?: 'rtl' | 'ltr';
    private remainingTime;
    runFirstUpdated(): void;
    private restartAutoHide;
    private pauseAutoHide;
    private resumeAutoHide;
    private handleCountdownChange;
    private handleCloseClick;
    handleOpenChange(): Promise<void>;
    handleDurationChange(): void;
    /** Shows the alert. */
    show(): Promise<void>;
    /** Hides the alert */
    hide(): Promise<void>;
    /**
     * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when
     * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by
     * calling this method again. The returned promise will resolve after the alert is hidden.
     */
    toast(): Promise<void>;
    render(): import('lit').TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-alert': CxAlert;
    }
}
