import { ControllerBase, type ControllerHost } from './Abstracts/ControllerBase';
/**
 * Configuration options for `AutoplayController`.
 *
 * @public
 */
export interface IAutoplayControllerConfig {
    /**
     * Callback invoked when the timer ticks and autoplay action should occur.
     * Example: next item selection, close notification, etc.
     *
     * @public
     */
    onTimerTick: () => void;
    /**
     * Function that returns the current autoplay timeout duration in milliseconds.
     * Allows for dynamic duration based on component state (e.g., per-item overrides).
     *
     * @public
     */
    getDuration: () => number;
    /**
     * Function that returns the element on which to listen for hover events (pause/resume).
     * Typically the main content container. If not provided, hover pause/resume is disabled.
     *
     * @public
     */
    getHoverElement?: () => HTMLElement | null;
    /**
     * Function that determines whether autoplay is currently enabled.
     * The timer only runs when this returns true.
     *
     * @public
     */
    isEnabled: () => boolean;
}
/**
 * AutoplayController - Manages timer-based autoplay with pause/resume on hover.
 *
 * Provides a reusable controller for components that need:
 * - Automatic periodic action (timer tick)
 * - Pause on pointer enter / resume on pointer leave
 * - Dynamic timeout duration
 * - Proper lifecycle cleanup
 *
 * Used by: ToastElement, CarouselElement, and similar components.
 *
 * @example
 * ```typescript
 * private readonly _autoplayController = new AutoplayController(this, {
 *   onTimerTick: () => this.selectNext(),
 *   getDuration: () => this.timeout,
 *   getHoverElement: () => this.getTemplatePart('content'),
 *   isEnabled: () => this.autoplay && this.timeout > 0
 * });
 *
 * // Public API
 * public start(): void { this._autoplayController.start(); }
 * public stop(): void { this._autoplayController.stop(); }
 * public pause(): void { this._autoplayController.pause(); }
 * public resume(): void { this._autoplayController.resume(); }
 * ```
 *
 * @public
 */
export declare class AutoplayController extends ControllerBase {
    private readonly _config;
    private readonly _timer;
    private _pointerEnterSubscription;
    private _pointerLeaveSubscription;
    private _hoverElement;
    /**
     * Constructs a new instance of the `AutoplayController` class.
     *
     * @public
     */
    constructor(host: ControllerHost, config: IAutoplayControllerConfig);
    /**
     * @public
     * @override
     */
    hostDisconnected(): void;
    /**
     * Starts the autoplay timer.
     * Only starts if `isEnabled()` returns true and duration > 0.
     *
     * @public
     */
    start(): void;
    /**
     * Stops the autoplay timer and cleans up hover listeners.
     *
     * @public
     */
    stop(): void;
    /**
     * Pauses the autoplay timer (suspends countdown, preserves remaining time).
     *
     * @public
     */
    pause(): void;
    /**
     * Resumes the autoplay timer (resumes countdown from where it was paused).
     *
     * @public
     */
    resume(): void;
    /**
     * Updates the timer duration and restarts with the new value.
     * Used when component state changes duration dynamically (e.g., Carousel item timeout override).
     *
     * @public
     * @param newDuration - New duration in milliseconds.
     */
    updateDurationAndRestart(newDuration: number): void;
    /**
     * Attaches hover listeners (pointerenter/pointerleave) to pause/resume the timer.
     *
     * @private
     */
    private attachHoverListener;
    /**
     * Detaches hover listeners and cleans up subscriptions.
     *
     * @private
     */
    private detachHoverListener;
}
/**
 * Factory function to add an `AutoplayController` to a host element.
 *
 * @public
 * @param host - The controller host element.
 * @param config - The autoplay configuration.
 * @returns The created controller instance.
 */
export declare function addAutoplayController(host: ControllerHost, config: IAutoplayControllerConfig): AutoplayController;
//# sourceMappingURL=AutoplayController.d.ts.map