import styles from './styles.module.css'; import { Mic } from '@mui/icons-material'; const RecorderControl: React.FC<{ status: string; onClick?: () => void; includeDiv?: boolean; tapToSpeak?: boolean; primaryColor: string; primaryDarkColor: string; }> = ({ status, onClick, includeDiv = true, tapToSpeak = false, primaryColor, primaryDarkColor }) => { const handleClick = () => { if (onClick) { onClick(); } }; let customStylesPulse; let customStylesProcess; let classPulse = ''; let classProcess = ''; if (status === 'error') { customStylesPulse = { background: 'red', border: '5px solid red', }; classPulse = styles.pulseRing; } else if (status === 'recording') { customStylesPulse = { background: primaryColor, border: `5px solid ${primaryColor}`, }; classPulse = styles.pulseRing; } else if (status === 'processing') { customStylesProcess = { borderColor: `transparent transparent ${primaryDarkColor} ${primaryDarkColor}`, }; classProcess = styles.loader; } return includeDiv ? (
{'label.tap_to_speak'}
)}