/** * Completion-sound player: plays one embedded MP3 through HTMLAudioElement * with a data: URL. Autoplay policy means `play()` can reject until the page * has sticky user activation; the player queues such attempts and flushes * them on the first explicit unlock (the plugin arms unlock on the first * pointer/key gesture). A new play replaces the in-flight element so rapid * completions never stack sounds, and a not-yet-unlocked request keeps only * the latest selection. */ /** Sound keys selectable in settings (the embedded map minus 'none'). */ export type SelectableSound = 'a' | 'b' | 'c'; /** Player dependencies, injectable for tests. */ export interface NotifyPlayerDeps { /** Audio element factory; defaults to the global Audio constructor. */ audio?: () => HTMLAudioElement; } /** The completion-sound player face. */ export interface NotifyPlayer { /** Mark user activation; flush any queued play attempts. */ unlock(): void; /** * Play one sound. * @param sound - embedded sound key. * @param volume - element volume, 0..1. */ play(sound: SelectableSound, volume: number): void; } /** * Build the player. * @param deps - injectable dependencies. * @returns the player face. */ export declare function createNotifyPlayer(deps?: NotifyPlayerDeps): NotifyPlayer;