/** * External dependencies */ import classnames from 'classnames'; import { __ } from '@wordpress/i18n'; import PropTypes from 'prop-types'; import { TAXES_ENABLED, DISPLAY_ITEMIZED_TAXES, } from '@woocommerce/block-settings'; /** * Internal dependencies */ import TotalsItem from '../item'; const TotalsTaxes = ( { currency, values, className } ) => { const { total_tax: totalTax, tax_lines: taxLines } = values; if ( ! TAXES_ENABLED ) { return null; } if ( ! DISPLAY_ITEMIZED_TAXES ) { return ( ); } return ( <> { taxLines.map( ( { name, price }, i ) => ( ) ) }{ ' ' } ); }; TotalsTaxes.propTypes = { currency: PropTypes.object.isRequired, values: PropTypes.shape( { total_tax: PropTypes.string, } ).isRequired, className: PropTypes.string, }; export default TotalsTaxes;