import { Group, Stack, Text, TextInput, type TextInputProps } from "@mantine/core"; type InputPassthrough = Partial; interface PhoneInputProps { disabled?: boolean; countryCode?: InputPassthrough; phone?: InputPassthrough; countryCodeError?: { message?: string }; phoneError?: { message?: string }; label?: string; } export default function PhoneInput({ disabled, countryCode: countryCodeProps, phone: phoneProps, countryCodeError, phoneError, label = "Phone Number", }: PhoneInputProps) { const errorMsg = countryCodeError?.message ?? phoneError?.message; return ( {label} {errorMsg && ( {errorMsg} )} ); }