import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { StyledButtonLink } from '../Button';
import NoValue from '../NoValue/NoValue';
import { formatPhone } from './utils';
const PhoneDisplay = forwardRef(function PhoneDisplay({ value, displayText, variant = 'link', formattingOptions: { showCountryCode = true } = {}, ...restProps }, ref) {
    const displayValue = value ? (displayText || formatPhone(value || '', { nationalFormat: !showCountryCode }) || value) : (_jsx(NoValue, {}));
    return variant === 'text' || !value ? (_jsx("span", { ref: ref, ...restProps, children: displayValue })) : (_jsx(StyledButtonLink, { ...restProps, variant: 'link', ref: ref, href: `tel:${value}`, children: displayValue }));
});
export default PhoneDisplay;
//# sourceMappingURL=PhoneDisplay.js.map