import { PrivateQueryMask } from '@graphcommerce/graphql' import { Money } from '@graphcommerce/magento-store' import { extendableComponent, sxx } from '@graphcommerce/next-ui' import { Box, type TypographyProps } from '@mui/material' import type { ProductListPriceFragment } from './ProductListPrice.gql' export const productListPrice = extendableComponent('ProductListPrice', [ 'prefix', 'root', 'finalPrice', 'discountPrice', 'suffix', ] as const) const { classes } = productListPrice export type ProductListPriceProps = ProductListPriceFragment & Pick & { prefix?: React.ReactNode suffix?: React.ReactNode asNumber?: boolean } export function ProductListPrice(props: ProductListPriceProps) { const { regular_price, final_price, sx, prefix, suffix, asNumber } = props return ( {prefix && ( {prefix} )} {regular_price.value !== final_price.value && ( )} {suffix && ( {suffix} )} ) }