import { ReactiveElement } from 'lit'; import { PendingSpinnerResult } from '../directives/pending-spinner/index.js'; type Constructor> = abstract new (...args: any[]) => T; /** The API {@link PendingMixin} adds to its host. */ export interface PendingInterface { pending: boolean; pendingLabel?: string; readonly pendingActive: boolean; getPendingAccessibleName(): string; renderPendingState(): PendingSpinnerResult; } /** * A mixin that adds the pending (busy) state to a host: the reactive `pending` * and `pending-label` properties, a {@link PendingController} for the delayed * visual / inline-size freeze / accessible-name derivation, and capture-phase * click suppression so activation is blocked while pending. * * The host stays focusable while pending; the mixin never sets the native * `disabled` attribute. The host's template is responsible for applying * `aria-disabled` and the pending `aria-label` (read from * {@link PendingInterface.getPendingAccessibleName}), and for rendering the * spinner with the `renderPendingSpinner` directive. * * The busy accessible name is derived from the host's optional * `accessibleLabel` when present, otherwise from trimmed `textContent`. * * @example * ```typescript * class MyButton extends PendingMixin(SpectrumElement) { * render() { * return html``; * } * } * ``` */ export declare function PendingMixin>(constructor: T): T & Constructor; export {};