'use client'; import * as React from 'react'; import { useController } from 'react-hook-form'; import { useFormControlProps, useFormMethods, useRequiredFieldName, type WithoutAriaInvalid, } from './Form.context'; import { Select, type SelectProps } from './Select'; type FormSelectProps = WithoutAriaInvalid; function FormSelectRoot({ name: nameProp, ...props }: FormSelectProps) { const { control } = useFormMethods(); const name = useRequiredFieldName(nameProp, 'Form.Select'); const { field } = useController({ control, defaultValue: props.defaultValue, name, }); return (