import { Control, ControllerProps } from "react-hook-form"; import { PhoneFieldProps } from "../PhoneField/PhoneField"; export interface PhoneFieldWithControllerProps extends PhoneFieldProps { /** * Instance of `Control` from `react-hook-form`. */ control: Control; /** * Represents the name of the form field used to register the component with `react-hook-form`. */ name: string; /** * Used to overwrite controller props. */ controllerProps?: Partial, "render">>; } /** * PhoneFieldWithController wraps `PhoneField` with a `react-hook-form` `Controller`, * connecting the phone number input to form state management. It handles value synchronization, * validation integration, and default value assignment automatically. * * ### When to use * Use PhoneFieldWithController when you have a phone number field inside a `react-hook-form` managed form. * * ### When not to use * Do not use PhoneFieldWithController outside of `react-hook-form` — use `PhoneField` directly. * * @example Phone field in a react-hook-form * ```tsx * import { PhoneFieldWithController } from "@trackunit/react-form-components"; * import { useForm } from "react-hook-form"; * * const ContactForm = () => { * const { control } = useForm(); * return ( * * ); * }; * ``` * @param {PhoneFieldWithControllerProps} props - The props for the PhoneFieldWithController component */ export declare const PhoneFieldWithController: { ({ control, controllerProps, name, value, ref, ...rest }: PhoneFieldWithControllerProps): import("react/jsx-runtime").JSX.Element; displayName: string; };