import { Loader2Icon, MicIcon, SquareIcon } from 'lucide-react' import { DictationFeedback } from '@/components/items/dictation-feedback' import { Button } from '@/components/ui/button' import { useDictateItems } from '@/hooks/use-dictate-items' type DictateItemsButtonProps = { listId: string } /** * "Dictar ítems" for an empty list: listens until the user stops it and adds what was * said through the same flow as the input's microphone (split by the API, undoable). */ export function DictateItemsButton({ listId }: DictateItemsButtonProps) { const { listening, busy, processing, heard, message, start, stop } = useDictateItems(listId) const label = processing ? 'Procesando el dictado' : listening ? 'Detener dictado' : 'Dictar ítems' return (
) }