import ReCaptcha from '~/common/components/elements/ReCaptcha'
import { useRegisterStore } from '~/common/stores/useRegisterStore'

const FormCaptcha = () => {
  const { updateValidCaptcha } = useRegisterStore()

  const handleCaptchaChange = (value: string | null) => {
    updateValidCaptcha(value !== null)
  }

  return <ReCaptcha onChange={handleCaptchaChange} />
}

export default FormCaptcha