import { type RefObject } from 'react';
/**
 * Inputs needed to manage speech playback for one chat message.
 *
 * @private internal hook of `<ChatMessageItem/>`
 */
export type UseChatMessageSpeechPlaybackOptions = {
    readonly trimmedMessageContent: string;
    readonly contentRef: RefObject<HTMLElement | null>;
    readonly shouldShowPlayButton: boolean;
    readonly elevenLabsVoiceId?: string;
};
/**
 * Speech playback state and actions returned to `<ChatMessageItem/>`.
 *
 * @private internal hook of `<ChatMessageItem/>`
 */
export type UseChatMessageSpeechPlaybackResult = {
    readonly audioError: string | null;
    readonly isAudioLoading: boolean;
    readonly isAudioPlaying: boolean;
    readonly handlePlayMessage: () => Promise<void>;
};
/**
 * Handles ElevenLabs speech playback, caching, and audio element lifecycle for one message.
 *
 * @private internal hook of `<ChatMessageItem/>`
 */
export declare function useChatMessageSpeechPlayback(options: UseChatMessageSpeechPlaybackOptions): UseChatMessageSpeechPlaybackResult;
