"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[11],{43:(e,r,a)=>{a.d(r,{a:()=>n});var s=a(0),c=(a(1),a(17));const{wrapper:i,wrapperLayer:t,visible:l}=c.a,n=({withLayer:e,currentColorPicker:r,toggleColorPicker:a})=>{const c=`${i} ${r?l:""} ${e?t:""}`;return(0,s.jsx)("div",{className:c,onClick:()=>a("")})}},157:(e,r,a)=>{a.d(r,{a:()=>f});var s=a(0),c=a(2),i=a(86);var t=a(156),l=a(281),n=a(35),o=a(7),d=a(28);const{wrapper:p,wrapperHero:u,wrapperBadge:h,wrapperBody:m,wrapperName:P,wrapperPrice:g,wrapperPriceHidden:j,wrapperPriceStrikethrough:b,wrapperPriceDiscountValue:v,wrapperPickers:x,image:k,name:N,nameTitle:O,wrapperPriceOriginal:w,wrapperPickersOpen:C,wrapperPickersOpenCarousel:S}=d.a,f=({product:e,badgeLabels:r,currencySymbol:a,isSaleBadgeEnabled:d})=>{const{handleActiveProductChange:h,handlePickerState:f,isPickerOpen:V,currentProduct:A,formattedTitle:B,currentVariant:$,discountPercent:y,colorPickerContainerRef:T,isCarousel:H,hasBogoSale:L}=(e=>{const[r,a]=(0,c.useState)(""),[s,t]=(0,c.useState)(!1),l=(0,c.useMemo)((()=>{if(""===r)return e[0];const a=e.findIndex((({handle:e})=>e===r));return-1===a?e[0]:e[a]}),[r,e.length]),{colorPickerContainerRef:n,isCarousel:o}=(0,i.b)(l.otherColorsProducts.length),d=""===(p=l).selectedValues.colorName?p.title.replace(p.selectedValues.brand,"").trim():p.title.replace(` - ${p.selectedValues.colorName}`,"").replace(p.selectedValues.brand,"").trim();var p;const{variants:u}=l,h=u[0],m=(P=Number(h.price||l.price),g=Number(h.compareAtPrice||l.compareAtPrice),Number((100*(g-P)/g).toFixed(0)));var P,g;const j=l.bogoSalePercentage;return{currentProductHandle:r,handleActiveProductChange:e=>a(e),handlePickerState:e=>t(e),isPickerOpen:s,currentProduct:l,formattedTitle:d,currentVariant:h,discountPercent:m,isCarousel:o,colorPickerContainerRef:n,hasBogoSale:j>0&&j<100}})(e),{handle:R,image:{url:E,altText:D},selectedValues:F}=A,I=y>0||L,M=`${y?b:""}`;return(0,s.jsxs)("div",Object.assign({className:p},{children:[(0,s.jsxs)("a",Object.assign({className:u,href:`/products/${R}?variant=${$.id}`},{children:[I?(0,s.jsx)(n.a,{discountPercent:y,isBogoSaleActive:L,isSaleBadgeEnabled:d,labels:r}):null,(0,s.jsx)("img",{className:k,src:E,alt:D})]})),(0,s.jsxs)("div",Object.assign({className:m},{children:[(0,s.jsx)("div",{children:(0,s.jsx)("div",Object.assign({className:P},{children:(0,s.jsx)("p",Object.assign({className:N},{children:(0,s.jsxs)("span",Object.assign({className:O},{children:[(0,s.jsx)("b",{children:F.brand}),(0,s.jsx)("br",{}),B," | ",F.colorName]}))}))}))}),(0,s.jsx)("div",Object.assign({ref:T},{children:(0,s.jsxs)("div",Object.assign({className:(0,l.a)(x,V&&C,V&&H&&S)},{children:[y>0?(0,s.jsxs)("div",Object.assign({className:(0,l.a)(g,V&&j)},{children:[(0,s.jsxs)("span",Object.assign({className:M},{children:[a,(0,o.d)((null==$?void 0:$.compareAtPrice)||A.compareAtPrice)]})),(0,s.jsxs)("span",Object.assign({className:v},{children:[" ",a,(0,o.d)((null==$?void 0:$.price)||A.price)]}))]})):(0,s.jsx)("div",Object.assign({className:(0,l.a)(g,V&&j)},{children:(0,s.jsxs)("span",Object.assign({className:w},{children:[a,(null==$?void 0:$.price)||A.price]}))})),(0,s.jsx)(t.a,{selectedProduct:R,toggleColorPicker:h,values:A.otherColorsProducts,handlePickerState:f,isPickerOpen:V,isCarousel:H})]}))}))]}))]}))}}}]);