import { Box, Text } from "@saleor/macaw-ui/next"; import Image from "next/image"; import { ProviderName } from "../provider-connections/provider-connections"; import { TaxJarIcon, AvataxIcon, StripeTaxIcon } from "../../assets"; type ProviderNameWithStripeTax = ProviderName | "stripeTax"; const providerConfig = { taxjar: { label: "TaxJar", icon: TaxJarIcon, }, avatax: { label: "Avatax", icon: AvataxIcon, }, stripeTax: { label: "Stripe Tax", icon: StripeTaxIcon, }, } satisfies Record< ProviderNameWithStripeTax, { label: string; icon: string; } >; export const ProviderLabel = ({ name }: { name: ProviderNameWithStripeTax }) => { const { label, icon } = providerConfig[name]; return ( {`provider {label} ); };