"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormEmailOrPhoneField = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const EmailOrPhoneField_1 = require("../../components/EmailOrPhoneField");
const forwardRefWithGeneric_1 = require("../../components/forwardRefWithGeneric");
const useFormFieldProps_1 = require("../useFormFieldProps");
const DEFAULT_VALUE = {
    value: '',
    normalizedValue: '',
    type: 'unknown',
};
/**
 * Адаптер для EmailOrPhoneField
 */
const FormEmailOrPhoneFieldInner = (props, ref) => {
    const fieldProps = (0, useFormFieldProps_1.useFormFieldProps)({
        ...props,
        defaultValue: props.defaultValue ||
            DEFAULT_VALUE,
    });
    return (0, jsx_runtime_1.jsx)(EmailOrPhoneField_1.EmailOrPhoneField, { ...fieldProps, ref: ref });
};
exports.FormEmailOrPhoneField = (0, forwardRefWithGeneric_1.forwardRefWithGeneric)(FormEmailOrPhoneFieldInner);
