/** * External dependencies */ import { OrderSummary, TotalsCoupon, TotalsDiscount, TotalsFooterItem, } from '@woocommerce/base-components/cart-checkout'; import { Subtotal, TotalsFees, TotalsTaxes, TotalsShipping, ExperimentalOrderMeta, getCurrencyFromPriceResponse, } from '@woocommerce/blocks-checkout'; import { useShippingDataContext } from '@woocommerce/base-context'; import { COUPONS_ENABLED, DISPLAY_CART_PRICES_INCLUDING_TAX, } from '@woocommerce/block-settings'; import { useStoreCartCoupons } from '@woocommerce/base-hooks'; const CheckoutSidebar = ( { cartCoupons = [], cartItems = [], cartFees = [], cartTotals = {}, } ) => { const { applyCoupon, removeCoupon, isApplyingCoupon, isRemovingCoupon, } = useStoreCartCoupons(); const { needsShipping } = useShippingDataContext(); const totalsCurrency = getCurrencyFromPriceResponse( cartTotals ); return ( <> { needsShipping && ( ) } { ! DISPLAY_CART_PRICES_INCLUDING_TAX && ( ) } { COUPONS_ENABLED && ( ) } ); }; export default CheckoutSidebar;