import { InputHTMLAttributes, ReactNode } from 'react'; import { Controller, FieldValues, RegisterOptions, useFormContext } from 'react-hook-form'; import { classNames } from '@/shared/lib/classNames/classNames'; import { Input } from '../../fieldsUI/Input/Input'; import { Cell } from '../../fieldsUI/Cell/Cell'; import cls from './HInput.module.scss'; interface HInputProps extends Omit, 'value' | 'onChange' | 'name'> { className?: string; name: string; label?: string; noteText?: ReactNode; mask?: string; maskOptions?: any; registerOptions?: Omit, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>; } export const HInput = (props: HInputProps) => { const { className, name, label, noteText, mask, maskOptions, registerOptions, ...otherProps } = props; const { control } = useFormContext(); return ( ( )} /> ); };