import { ref, readonly } from 'vue'; import { TTSProvider } from '../providers/types.js'; export interface UseVoiceQueueOptions { /** Override the injected provider for this queue instance */ provider?: TTSProvider; } export interface UseVoiceQueueReturn { /** Items waiting to be spoken (does not include the currently-speaking item) */ readonly queue: ReturnType>>>; /** The text currently being spoken, or null if idle */ readonly currentItem: ReturnType>>>; /** Whether the queue is currently speaking something */ readonly isPlaying: ReturnType>>>; /** Add a text item to the end of the queue. Starts speaking immediately if idle */ enqueue(text: string): void; /** * Manually pop the next item from the queue without speaking it. * Useful for manual queue management; does NOT affect auto-advance behaviour. */ dequeue(): string | undefined; /** Stop the current utterance and discard all pending items */ clear(): void; /** * Stop the current utterance immediately. * Auto-advance fires the next item via `onEnd`. */ skip(): void; } /** * Reactive voice queue — auto-advances to the next item when each utterance ends. * * The queue relies on the provider's `onEnd` hook (added in Sprint 2, I-2.1) * to advance automatically. The `isPlaying` flag guards against double-advance * when multiple composables share the same provider instance. * * All providers (WebSpeech + AI) consistently emit `onEnd` after every speak() * call, whether it ended normally or via an error. */ export declare function useVoiceQueue(options?: UseVoiceQueueOptions): UseVoiceQueueReturn;