import { View, Image } from "@tarojs/components";
import IconVolumeUp from '@/images/svgs/chat/IconVolumeUp.svg'
import IconVolumeUpColor from '@/images/svgs/chat/IconVolumeUpColor.svg'
import style from './index.module.less'

interface IProps {
  setEnable: (enable: boolean)=> void
  enable: boolean
}
export default function ButtonEnableStreamVoice({
  setEnable,
  enable
}:IProps) {
  const handleClick = ()=> {
    setEnable(!enable)
  }
  return  <View className={`${enable ? style.buttonRoundedActived: style.buttonRounded}`} onClick={handleClick}>
      <Image className="w-16 h-16" src={enable ? IconVolumeUpColor : IconVolumeUp} mode='widthFix'></Image>
      <View className={enable ? 'text-primary':'text-black'}>语⾳朗读</View>
  </View>
}
