1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-select.esm.H5GyIIS6.js","assets/memoize-one.esm.sgM6qpEC.js","assets/index-KDcLenRU.js","assets/index.ZwqORRZd.css","assets/emotion-element-f0de968e.browser.esm.61_hlabn.js","assets/emotion-utils.browser.esm.PLmk2cuA.js","assets/setPrototypeOf.ahVgEFUp.js","assets/hoist-non-react-statics.cjs.FLDqboxU.js"])))=>i.map(i=>d[i]); 2import{r as s,_ as g,P as o,d as x,aY as A,f as c,j as e,ab as r,n as C,aZ as y,a_ as T}from"./index-KDcLenRU.js";import{q as E}from"./react-select-utils.fldikllN.js";import"./variables.w40geAFS.js";const j=a=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16.859,height:20.231,viewBox:"0 0 16.859 20.231",...a},s.createElement("path",{id:"bag",d:"M15.883,0a2.713,2.713,0,0,0-2.712,2.7V4.289H10.392a.394.394,0,0,0-.061,0,.633.633,0,0,0-.571.578L8.491,19.546a.628.628,0,0,0,.165.48.635.635,0,0,0,.467.2H24.712a.632.632,0,0,0,.633-.685L24.075,4.867a.634.634,0,0,0-.632-.578H20.665V2.7A2.71,2.71,0,0,0,17.957,0Zm0,1.264h2.075A1.418,1.418,0,0,1,19.4,2.7V4.289H14.44V2.7a1.422,1.422,0,0,1,1.443-1.434Zm-4.91,4.29h2.2V7.429h0a.635.635,0,0,0,1.269,0V5.554H19.4V7.43a.635.635,0,0,0,1.269,0V5.555h2.2l1.157,13.413H9.817Z",transform:"translate(-8.488)",fill:"#fff"})),w=s.lazy(()=>g(()=>import("./react-select.esm.H5GyIIS6.js").then(a=>a.r),__vite__mapDeps([0,1,2,3,4,5,6,7]))),P=({product:a,simpleView:u=!0,productPageMobile:b=!1,disabled:i=!1})=>{const{t:d}=x(),v=A(),h=c(t=>t.toggleCartModal),m=c(t=>t.setAddedProduct),[l,p]=s.useState({label:"1",value:1}),n=t=>{if(t.preventDefault(),t.stopPropagation(),a.ast===r.Exhausted){C(d("cart.notAvailable"));return}const f=l.value??1;v.mutate({productId:a.id,dimensionId:0,quantity:l.value??1}),y({...a,quantity:f}),m(a,l.value??1),T(a),h()};return e.jsxs("div",{className:"add-to-cart-section",children:[e.jsx(s.Suspense,{fallback:null,children:!u&&e.jsx(w,{id:"viewPerPage",styles:E,classNames:{control:()=>"select-input"},options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5}],value:l||{label:"1",value:1},onChange:t=>p(t),noOptionsMessage:()=>d("cart.noOptions"),isSearchable:!1})}),e.jsx("button",{"aria-label":"Add to Cart",className:"add-to-cart-icon list-view-disabled",onClick:n,disabled:i||a.ast===r.Exhausted||a.cprc<=0,children:e.jsx(j,{})}),e.jsx("div",{className:"list-view-enabled",children:e.jsx("button",{"aria-label":"Add to Cart",className:"blue-button",onClick:n,disabled:i||a.ast===r.Exhausted||a.cprc<=0,children:d(b?"cart.add":"cart.addToCart")})})]})};P.propTypes={product:o.object,simpleView:o.bool,productPageMobile:o.bool,disabled:o.bool};export{P 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.