1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1210],{61210:function(t,e,r){r.r(e);var c=r(85893),a=r(67294),n=r(77808),o=r(67766);r(41664);var u=r(11163),i=r.n(u),l=r(47305),s=r(4741),d=r(93967),g=r.n(d);e.default=function(t){var e,r,d;let m=(0,a.useContext)(l.Z);(0,u.useRouter)();let{isAuthenticated:p,cart:h}=m;m.cart.checkQuantity;let[x,v]=(0,a.useState)(!1),[f,y]=(0,a.useState)([]),[_,k]=(0,a.useState)([]),b=!!m.storage.get("cart")&&!!JSON.parse(m.storage.get("cart")).items&&JSON.parse(m.storage.get("cart"));return(0,a.useEffect)(()=>{k(m.cart.subTotal()),y((0,o.Po)(b,t.variants))},[m.cart.state]),(0,c.jsxs)(s.AP,{className:g()("cart"),onClick:m.cart.toggle,children:[console.log("cartVariants",f),f?f.map((t,e)=>{var r,a;return(0,c.jsx)(s.xs,{position:f.length-e,title:"".concat(null!==(r=t.parent.title)&&void 0!==r?r:t.title),slug:t.sku,tags:null!==(a=t.tags)&&void 0!==a?a:null,image:t.parent&&t.parent.images?(0,n.$)(t.parent.images[0]):t.parent&&t.parent.default?(0,n.$)(t.parent.default):null,display:"card",variants:(0,c.jsx)(s.$e,{api:"https://backend.tellingdeath.ch",display:"smart",variants:t,image:!!t.image&&(0,n.$)(t.image),currency:m.cart.currency(),currencyRate:m.cart.currencyRate(),addItemFunc:m.cart.addItem,removeItemFunc:m.cart.removeItem,checkQuantityFunc:m.cart.checkQuantityItem},"cart_widget_product_".concat(t.slug,"_").concat(f.length-e))},"cart_widget_product_".concat(f.length-e))}):"",_>0?(0,c.jsx)(s.KP,{position:2,subTotal:Number(m.cart.subTotal()).toFixed(2),price:Number(m.cart.total()).toFixed(2),delivery:Number(m.cart.delivery()).toFixed(2),promocode:!!m.promocode.get()&&m.promocode.get().code,discountAmount:null!==(r=Number(m.cart.discount().amount).toFixed(2))&&void 0!==r&&r,discountPercent:null!==(d=Number(m.cart.discount().percent).toFixed(2))&&void 0!==d&&d,currency:String(m.cart.currency()),currencyRate:String(m.cart.currencyRate()),children:(null===(e=t.config)||void 0===e?void 0:e.checkout_formular)&&t.config.checkout_formular.slug?(0,c.jsx)(s.zx,{icon:"request_quote",label:"Commander",onClick:()=>void(m.cart.toggle(),t.config&&t.config.checkout_formular&&i().push("/formular/".concat(t.config.checkout_formular.slug)))}):""}):"",0==_?(0,c.jsx)("div",{className:"cart-error-component",style:{height:"100%",color:"black",textAlign:"center"},children:(0,c.jsxs)("div",{className:"cart-error-component-inner",style:{padding:"40px"},children:[(0,c.jsx)("h5",{style:{marginBottom:"40px"},children:"Encore aucun objet dans le caddie"}),(0,c.jsx)(s.zx,{icon:"request_quote",label:"Shop",onClick:t=>{i().push("/")}})]})}):""]},"cart_widget")}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.