import { type Order } from './order';
type Politeness = 'polite' | 'assertive';
type AnnounceOptions = {
    /**
     * The politeness level for a message.
     *
     * Note: a politeness level of `assertive` should only be used for
     * time-sensistive or critical notifications that absolutely require the
     * user's immediate attention
     *
     * @see https://www.w3.org/TR/wai-aria/#aria-live
     * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions
     */
    politeness?: 'assertive';
    /**
     * A delay in milliseconds to wait before announcing a message.
     */
    delayMs?: never;
} | {
    politeness?: 'polite';
    delayMs?: number;
};
type Message = {
    contents: string;
    politeness: Politeness;
    scheduled: number;
};
/**
 * A function to cancel a scheduled message.
 */
type Cancel = () => void;
declare class LiveRegionElement extends HTMLElement {
    #private;
    constructor();
    /**
     * The delay in milliseconds to wait between announcements. This helps to
     * prevent announcements getting dropped if multiple are made at the same time.
     */
    get delay(): number;
    set delay(value: number);
    /**
     * Announce a message using a live region with a corresponding politeness
     * level.
     */
    announce(message: string, options?: AnnounceOptions): Cancel;
    /**
     * Announce a message using the text content of an element with a
     * corresponding politeness level
     */
    announceFromElement(element: HTMLElement, options?: AnnounceOptions): Cancel;
    getMessage(politeness?: AnnounceOptions['politeness']): string | null;
    /**
     * Prevent pending messages from being announced by the live region.
     */
    clear(): void;
}
declare const templateContent = "\n<style>\n:host {\n  clip-path: inset(50%);\n  height: 1px;\n  overflow: hidden;\n  position: absolute;\n  white-space: nowrap;\n  width: 1px;\n}\n</style>\n<div id=\"polite\" aria-live=\"polite\" aria-atomic=\"true\"></div>\n<div id=\"assertive\" aria-live=\"assertive\" aria-atomic=\"true\"></div>\n";
export declare function compareMessages(a: Message, b: Message): Order;
export { LiveRegionElement, templateContent };
export type { AnnounceOptions };
