import { ArrowUp, LoaderCircle, X } from 'lucide-react'
export type VoiceStatusOverlayState = 'starting' | 'recording' | 'readyToSend' | 'processing' | 'sending'
interface VoiceStatusOverlayProps {
show: boolean
label: string | null
state: VoiceStatusOverlayState | null
}
function WaveformBars() {
return (
{[0, 1, 2, 3, 4].map((i) => (
))}
)
}
export function VoiceStatusOverlay({ show, label, state }: VoiceStatusOverlayProps) {
if (!show || !label || !state) {
return null
}
const isLoading = state === 'starting' || state === 'processing' || state === 'sending'
const actionWords = state === 'readyToSend'
? ['Release', 'To', 'Send']
: ['Swipe', 'To', 'Send']
return (
{label}
{isLoading ? (
state === 'processing' ? (
) : (
)
) : (
<>
{actionWords.map((word) => (
{word}
))}
>
)}
{!isLoading && (
)}
)
}