import { Select } from "@/components/ui"; import type { ComponentPropsWithoutRef } from "react"; import { type Control, type FieldValues, type UseControllerProps, useController, } from "react-hook-form"; type Props = Omit< UseControllerProps, "control" | "defaultValue" | "rules" > & Omit, "value" | "onValueChange"> & { control: Control; }; export const FormSelect = ({ control, name, disabled, shouldUnregister, ...rest }: Props) => { const { field: { onChange, ...field }, } = useController({ control, name, disabled, shouldUnregister, }); return