import React from "react"; import { Link } from "@mui/material"; import Stack from "@mui/material/Stack"; import Typography from "@mui/material/Typography"; import { countryCodeFormatter } from "../../../util/country_code_formatter"; export interface AddressLineProps { value?: string; icon?: JSX.Element; bold?: boolean; } export const AddressLine: React.FC = ({ value, icon, bold = false }) => value == null ? null : icon != null ? ( {icon} {value} ) : ( {value} ); export interface AddressInfo { name?: string; givenName?: string; familyName?: string; companyName?: string; careOf?: string; streetAddress: string; streetAddress2?: string; postalCode: string; city: string; region?: string; countryCode: string; email?: string; phone?: string; } export interface AddressInfoProps { info: AddressInfo; } export const AddressInfo: React.FC = ({ info: { name, givenName, familyName, companyName, careOf, streetAddress, streetAddress2, postalCode, city, region, countryCode, email, phone, }, }) => ( a": { color: "text.primary" } }}> {Boolean(givenName || familyName) && ( )} {careOf && } {Boolean(postalCode && city) && } {countryCode != null && } );