import{a as p}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-53X6TREL.js";import{f as y,g as N,h as b}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-D7BLS3P5.js";import{a as f}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-L2RNFW2O.js";import{e as v,g}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-LMJVQM5Q.js";import{a as i}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-MEFRPCES.js";import{a as l}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-722DUSLT.js";import{d as t}from"https://cdn.shopify.com/oxygen-v2/26324/10616/21935/1653405/build/_shared/chunk-SFLZO754.js";var x=t(l());function w({children:s,as:a="div",width:o,height:d,className:n,...m}){let r=i("rounded bg-white animate-pulse",n);return(0,x.jsx)(a,{...m,width:o,height:d,className:r,children:s})}var e=t(l());function G({onClick:s,storefrontProduct:a,variantGid:o}){let d=b(o)??a.variants.nodes.find(k=>k.id==o)??a.variants.nodes[0];if(d==null)return null;let n=y(a.options),m=N(a.options),{availableForSale:r,compareAtPrice:c,image:u,price:h}=d;return(0,e.jsx)(f,{onClick:s,to:`/products/${a.handle}`,children:(0,e.jsxs)("div",{className:i("group flex h-[108px] gap-4 rounded-md border border-lightGray bg-white p-3 text-sm duration-500 ease-out","hover:rounded-lg hover:border-darkGray"),role:"row",children:[(0,e.jsx)("div",{role:"cell",className:"relative flex-shrink-0",children:(0,e.jsxs)("div",{className:i("relative h-full w-[110px] overflow-hidden rounded-sm bg-lightGray duration-500 ease-out","group-hover:rounded-md"),children:[u&&(0,e.jsx)(g,{className:i("absolute inset-0 h-full w-full object-cover",!r&&"opacity-50"),data:u,crop:"center",width:"110px"}),(0,e.jsxs)("div",{className:"absolute left-2 top-2",children:[r&&c&&(0,e.jsx)(p,{label:"Sale",small:!0,tone:"critical"}),!r&&(0,e.jsx)(p,{label:"Sold out",small:!0})]})]})}),(0,e.jsxs)("div",{className:"overflow-hidden",children:[(0,e.jsxs)("div",{className:"mr-3 space-y-1",children:[(0,e.jsx)("div",{className:"truncate font-bold group-hover:underline",children:a.title}),a.vendor&&(0,e.jsx)("div",{className:"truncate text-darkGray",children:a.vendor}),n&&(0,e.jsx)("div",{className:"truncate text-darkGray",children:m})]}),(0,e.jsxs)("div",{className:"mt-3 flex font-bold ",children:[c&&(0,e.jsx)("span",{className:"text-darkGray",children:(0,e.jsx)(v,{data:c,className:"mr-2.5 line-through decoration-red"})}),h&&(0,e.jsx)(v,{data:h})]})]})]})})}function W(){return(0,e.jsxs)(w,{className:i("group flex h-[108px] gap-4 rounded-md border border-lightGray bg-white p-3 text-sm duration-500 ease-out"),role:"row",children:[(0,e.jsx)("div",{role:"cell",className:"relative flex-shrink-0",children:(0,e.jsx)("div",{className:i("relative h-full w-[110px] overflow-hidden rounded-sm bg-gray duration-500 ease-out","group-hover:rounded-md")})}),(0,e.jsxs)("div",{className:"overflow-hidden",children:[(0,e.jsxs)("div",{className:"mr-3 space-y-1",children:[(0,e.jsx)("div",{className:"mb-2 h-4 w-48 rounded-full bg-gray"}),(0,e.jsx)("div",{className:"mb-2 h-3 w-30 rounded-full bg-gray"}),(0,e.jsx)("div",{className:"mb-2 h-3 w-18 rounded-full bg-gray"})]}),(0,e.jsx)("div",{className:"mt-4 flex",children:(0,e.jsx)("div",{className:"h-3 w-24 rounded-full bg-gray"})})]})]})}export{G as a,W as b};