/** * External dependencies */ import { __, sprintf } from '@wordpress/i18n'; import { getCurrency } from '@woocommerce/base-utils'; import Label from '@woocommerce/base-components/label'; import { ProductImage, ProductLowStockBadge, ProductMetadata, ProductName, ProductPrice, } from '@woocommerce/base-components/cart-checkout'; import PropTypes from 'prop-types'; import Dinero from 'dinero.js'; const CheckoutOrderSummaryItem = ( { cartItem } ) => { const { images, low_stock_remaining: lowStockRemaining = null, name, permalink, prices, quantity, summary, variation, } = cartItem; const currency = getCurrency( prices ); const regularPrice = parseInt( prices.regular_price, 10 ); const purchasePrice = parseInt( prices.price, 10 ); const linePrice = Dinero( { amount: parseInt( prices.raw_prices.price, 10 ), precision: parseInt( prices.raw_prices.precision, 10 ), } ) .multiply( quantity ) .convertPrecision( currency.minorUnit ) .getAmount(); return (