text: import { Fragment } from 'react';
  import CheckoutCartItem from "./CheckoutCartItem";
  
  const YourOrder = ({ cart, t }) => {
  
  	return (
  		<Fragment>
  			{cart ? (
  				<Fragment>
  					<div className="mt-8 md:mt-12 p-8 rounded-md bg-gray-50">
  						<div className="flow-root">
  							<ul role="list" className="-my-6 divide-y divide-gray-200">
  								{cart.products.length && (
  									cart.products.map((item, i) => (
  										<CheckoutCartItem key={item.productId + i} item={item} t={t} />
  									))
  								)}
  							</ul>
  							<ul role="list" style={{ borderTop: '1px solid rgba(229, 231, 235, 1)' }} className="divide-y divide-gray-200 px-0 mt-6">
  								<li className="flex justify-between py-4">
  									<p className="text-gray-500 text-sm font-normal">{t('yourorder.subtotal')}</p>
  									<p className="text-gray-800 text-sm font-medium w-1/3 text-right">{('string' !== typeof cart.subTotalProductsPrice) ? cart.subTotalProductsPrice.toFixed(2) : cart.subTotalProductsPrice}</p>
  								</li>
  								{cart.appliedCoupons ? cart.appliedCoupons.map((coupon, i) => (
  									<li key={i} className="flex justify-between py-4">
  										<div>
  											<p className="text-gray-500 text-sm font-normal">{coupon.code}</p>
  										</div>
  										<p className="text-gray-800 text-sm font-medium w-1/3 text-right">- {coupon.discountAmount}</p>
  									</li>
  								)) : null}
  								<li className="flex justify-between py-4">
  									<p className="text-gray-500 text-sm font-normal">{t('yourorder.shipping')}</p>
  									<p className="text-gray-800 text-sm font-medium sm:w-1/3 text-right">{cart.shippingCosts.substring(1) === '0,00' ? t('yourorder.freeshipping') : cart.shippingCosts}</p>
  								</li>
  								<li className="flex justify-between pt-4">
  									<p className="text-gray-800 font-medium">{t('yourorder.total')}</p>
  									<p className="text-gray-800 font-medium w-1/3 text-right">{('string' !== typeof cart.totalProductsPrice) ? cart.totalProductsPrice.toFixed(2) : cart.totalProductsPrice}</p>
  								</li>
  							</ul>
  						</div>
  					</div>
  				</Fragment>
  			) : ''}
  		</Fragment>
  	)
  };
  
  export default YourOrder;
  