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