/** * External dependencies */ import { SubtotalsItem, TotalsFeesItem, TotalsCouponCodeInput, TotalsDiscountItem, TotalsFooterItem, TotalsShippingItem, TotalsTaxesItem, } from '@woocommerce/base-components/totals'; import { getCurrencyFromPriceResponse } from '@woocommerce/base-utils'; import { COUPONS_ENABLED, DISPLAY_CART_PRICES_INCLUDING_TAX, } from '@woocommerce/block-settings'; import { useStoreCartCoupons } from '@woocommerce/base-hooks'; const CheckoutSidebar = ( { cartCoupons = [], cartTotals = {}, shippingRates, } ) => { const { applyCoupon, removeCoupon, isApplyingCoupon, isRemovingCoupon, } = useStoreCartCoupons(); const shippingAddress = shippingRates[ 0 ]?.destination; const totalsCurrency = getCurrencyFromPriceResponse( cartTotals ); return ( <> { ! DISPLAY_CART_PRICES_INCLUDING_TAX && ( ) } { COUPONS_ENABLED && ( ) } ); }; export default CheckoutSidebar;