import { cn } from "@/lib/utils"; import { useId } from "react"; import { type FieldErrors, type FieldValues, type Path, type UseFormRegister, type UseFormRegisterReturn, } from "react-hook-form"; type PropsType = { name: Path; label: string; placeholder?: string; required?: boolean; disabled?: boolean; active?: boolean; className?: string; icon?: React.ReactNode; defaultValue?: string; dataCy?: string; handleChange?: (e: React.ChangeEvent) => void; register?: UseFormRegister; errors?: FieldErrors; } & Partial; export function TextAreaGroup({ name, label, placeholder, required, disabled, active, className, icon, defaultValue, dataCy, handleChange, register, errors, onChange, onBlur, ref, ...props }: PropsType) { const id = useId(); const error = errors && errors[name]; return (