"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2553],{6768:function(e,t,r){r.r(t),r.d(t,{default:function(){return cart_OrderSummary_OrderSummary}});var a=r(3067),n=r(4235),u=r(5310),o=r(643),s=r(1549),l=["subTotal","total","numberOfItems","checkoutButton"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}var cart_OrderSummary_OrderSummary=function(e){var{subTotal:t,total:r,numberOfItems:c,checkoutButton:d}=e,m=(0,n.Z)(e,l),i=t-r,f=(0,o.P)(i);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.Z,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){(0,a.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({subtotalLabel:"Subtotal (".concat(c," products)"),subtotalValue:(0,o.P)(t),discountValue:i>0?"-".concat(f):void 0,totalValue:(0,o.P)(r)},m)),d]})}},643:function(e,t,r){r.d(t,{P:function(){return useFormattedPrice}});var a=r(4194),n=r(31),usePriceFormatter=function(){var{decimals:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{currency:t,locale:r}=(0,n.kP)();return(0,a.useCallback)(a=>Intl.NumberFormat(r,{style:"currency",currency:t.code,minimumFractionDigits:e?2:0}).format(a),[t.code,r,e])},useFormattedPrice=e=>{var t=usePriceFormatter();return(0,a.useMemo)(()=>t(e),[t,e])}},5310:function(e,t,r){var a=r(4194),n=r(4564),u=r(1953);let o=(0,a.forwardRef)(function({testId:e="fs-order-summary",subtotalLabel:t,subtotalValue:r,discountLabel:o="Discount",discountValue:s,totalLabel:l="Total",totalValue:c,includeTaxes:d=!1,includeTaxesLabel:m="Tax included",...i},f){return a.createElement(n.Z,{ref:f,"data-fs-order-summary":!0,"data-testid":e,...i},r?a.createElement("li",{"data-fs-order-summary-subtotal":!0},a.createElement("span",{"data-fs-order-summary-subtotal-label":!0,"data-testid":`${e}-subtotal-label`},t),a.createElement("span",{"data-fs-order-summary-subtotal-value":!0,"data-testid":`${e}-subtotal-value`},r)):null,s?a.createElement("li",{"data-fs-order-summary-discount":!0},a.createElement("span",{"data-fs-order-summary-discount-label":!0,"data-testid":`${e}-discount-label`},o),a.createElement("span",{"data-fs-order-summary-discount-value":!0,"data-testid":`${e}-discount-value`},s)):null,a.createElement("li",{"data-fs-order-summary-total":!0},a.createElement("span",{"data-fs-order-summary-total-label":!0,"data-testid":`${e}-total-label`},l),a.createElement("span",{"data-fs-order-summary-total-value":!0,"data-testid":`${e}-total-value`},c)),d&&a.createElement("li",{"data-fs-order-summary-taxes-label":!0},a.createElement(u.Z,null,m)))});t.Z=o}}]);