1import{K as u,j as r}from"./@react-core-DAiQxeIm.js";import{M as h}from"./MainLayout-BG0Ff-G8.js";import{M as f}from"./MetaHeader-Dyrie7Xm.js";import{M as m}from"./MyAccountWrapper-mik40Pjf.js";import{F as a}from"./FormatPrice-DHQ3sYHY.js";import{f as n,a as i}from"./formatUtils-Dfm070S1.js";import{f as g}from"./format-BOAtzQcC.js";import"./app-Cyh6yV_e.js";import"./WrapperLayout-DW7P2zvO.js";import"./fetch-DIMp6ACm.js";import"./renderComponents-PVdm_eq0.js";import"./MetricsEvents-ePHyF7G_.js";import"./useThemeVisuals-B1RdzApi.js";import"./useIsOnlineLightingShop-CZ-toRlz.js";import"./useModal-DijYsnd1.js";const N=({data:x})=>{var l;const{t:d}=u().props,c=(l=d==null?void 0:d.discounts)==null?void 0:l.card,o="font-medium max-sm:text-sm",e="text-sm";return r.jsx(r.Fragment,{children:x==null?void 0:x.map(s=>{const p=s==null?void 0:s.idDiscountType,j={0:()=>"-",1:()=>`${i(s==null?void 0:s.value)}%`,2:()=>`${n(s==null?void 0:s.value)} ${s!=null&&s.reductionTax?c==null?void 0:c.tax_incl:c==null?void 0:c.tax_excl}`,3:()=>c==null?void 0:c.free_shipping};return r.jsxs("li",{className:"grid grid-cols-[1fr_1fr] sm:grid-cols-[1fr_1fr_1fr_1fr_1fr] justify-between gap-3 gap-x-6 bg-white p-3 rounded",children:[r.jsxs("div",{children:[r.jsx("p",{className:e,children:c==null?void 0:c.code}),r.jsx("p",{className:`${o} text-colorPrimary`,children:s==null?void 0:s.code})]}),r.jsxs("div",{children:[r.jsx("p",{className:e,children:c==null?void 0:c.discount}),r.jsxs("p",{className:`${o} text-colorPink`,children:[j[p]()||"-"," ",r.jsx("br",{})]})]}),r.jsxs("div",{children:[r.jsx("p",{className:e,children:c==null?void 0:c.minimal}),r.jsx("p",{className:`${o} text-colorPink`,children:parseFloat(s==null?void 0:s.minimal)===0?r.jsx(r.Fragment,{children:c==null?void 0:c.not}):r.jsx(a,{price:s==null?void 0:s.minimal})})]}),r.jsxs("div",{children:[r.jsx("p",{className:e,children:c==null?void 0:c.accumulative}),r.jsx("p",{className:`${o} text-colorPink`,children:s!=null&&s.cumulable?c==null?void 0:c.yes:c==null?void 0:c.not})]}),r.jsxs("div",{children:[r.jsx("p",{className:e,children:c==null?void 0:c.date_to}),r.jsxs("p",{className:`${o} text-colorPrimary`,children:[" ",g(s==null?void 0:s.dateTo,"dd-MM-yyyy")]})]})]},s==null?void 0:s.code)})})};function H(){var s,p;const{metas:x,t:d,discounts:c,userMenuCustomerArea:o}=u().props,e=d==null?void 0:d.discounts,l=(c==null?void 0:c.length)>0;return r.jsx(r.Fragment,{children:r.jsxs(h,{children:[r.jsx(f,{metas:x}),r.jsx(m,{titlePage:e==null?void 0:e.title_page,dataMenu:o,children:l?r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"font-medium mb-4",children:e==null?void 0:e.title}),r.jsx("ul",{className:"flex flex-col gap-2",children:r.jsx(N,{data:c})})]}):r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"font-medium mb-4 text-xl sm:text-2xl",children:(s=e==null?void 0:e.no_discounts)==null?void 0:s.title}),r.jsx("p",{className:"font-medium",children:(p=e==null?void 0:e.no_discounts)==null?void 0:p.description})]})})]})})}export{H as default};
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.