import type { TextFieldProps } from '@mui/material/TextField'; import type { Country } from 'react-phone-number-input/input'; import { useState, forwardRef } from 'react'; import PhoneNumberInput from 'react-phone-number-input/input'; import TextField from '@mui/material/TextField'; import InputAdornment from '@mui/material/InputAdornment'; import { getCountryCode } from './utils'; import { CountryListPopover } from './list'; import type { PhoneInputProps } from './types'; // ---------------------------------------------------------------------- export const PhoneInput = forwardRef( ({ value, onChange, placeholder, country: inputCountryCode, disableSelect, ...other }, ref) => { const defaultCountryCode = getCountryCode(value, inputCountryCode); const [selectedCountry, setSelectedCountry] = useState(defaultCountryCode); return ( setSelectedCountry(inputValue)} /> ), } } {...other} /> ); } ); // ---------------------------------------------------------------------- const CustomInput = forwardRef(({ ...props }, ref) => ( ));