"use client" import { WAVE_BAR_COUNT } from "@/hooks/use-speech-dictation" import { cn } from "@/lib/utils" const BAR_MAX_PX = 16 const BAR_MIN_SCALE = 0.28 export interface DictationSoundwaveProps { levels?: number[] className?: string "aria-hidden"?: boolean } /** Four pill bars in the Stop button — each driven by its own mic level. */ export function DictationSoundwave({ levels, className, "aria-hidden": ariaHidden = true, }: DictationSoundwaveProps) { const values = Array.from({ length: WAVE_BAR_COUNT }, (_, i) => Math.min(1, Math.max(0, levels?.[i] ?? 0)), ) return (