import { ReactNode } from 'react'; import { Controller, FieldValues, RegisterOptions, useFormContext } from 'react-hook-form'; import { classNames } from '@/shared/lib/classNames/classNames'; import cls from './HCheckbox.module.scss'; import { Cell } from '@/shared/ui/FormComponents/fieldsUI/Cell/Cell'; import { Checkbox } from '@/shared/ui/FormComponents/fieldsUI/Checkbox/Checkbox'; interface HCheckboxProps { className?: string; name: string; label?: string; children?: ReactNode; noteText?: ReactNode; registerOptions?: Omit, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>; } export const HCheckbox = (props: HCheckboxProps) => { const { className, name, label, children, noteText, registerOptions } = props; const { control } = useFormContext(); return ( ( {children} )} /> ); };