import { jsx as _jsx } from "react/jsx-runtime";
import { EmailOrPhoneField, } from '../../components/EmailOrPhoneField';
import { forwardRefWithGeneric } from '../../components/forwardRefWithGeneric';
import { useFormFieldProps } from '../useFormFieldProps';
const DEFAULT_VALUE = {
    value: '',
    normalizedValue: '',
    type: 'unknown',
};
/**
 * Адаптер для EmailOrPhoneField
 */
const FormEmailOrPhoneFieldInner = (props, ref) => {
    const fieldProps = useFormFieldProps({
        ...props,
        defaultValue: props.defaultValue ||
            DEFAULT_VALUE,
    });
    return _jsx(EmailOrPhoneField, { ...fieldProps, ref: ref });
};
export const FormEmailOrPhoneField = forwardRefWithGeneric(FormEmailOrPhoneFieldInner);
