import{d as e,s as t,t as n,u as r}from"./src-C0xjWfnx.js";import{t as i}from"./useNavigate-VRicZWJI.js";import{t as a}from"./createLucideIcon-7nArgiy8.js";import{a as o}from"./prominent-api-hooks-DipwWw0H.js";var s=a(`Store`,[[`path`,{d:`m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7`,key:`ztvudi`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}],[`path`,{d:`M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4`,key:`2ebpfo`}],[`path`,{d:`M2 7h20`,key:`1fcdvo`}],[`path`,{d:`M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7`,key:`6c3vgh`}]]),c=e();function l(){let e=i(),{data:a}=o(),l=a?.data||[];return(0,c.jsxs)(n,{children:[(0,c.jsx)(r,{weight:`bold`,className:`mb-4 text-xl`,children:`Our Stores`}),(0,c.jsx)(`div`,{className:`grid grid-cols-2 gap-4`,children:l.map(n=>(0,c.jsxs)(t,{onClick:()=>e({to:`/stores/$storeId`,params:{storeId:String(n.id)}}),className:`rounded-xl border border-gray-100 bg-white p-4 shadow-sm`,children:[(0,c.jsx)(`div`,{className:`mb-3 flex h-32 w-full items-center justify-center overflow-hidden rounded-lg bg-gray-100`,children:n.imageUrl?(0,c.jsx)(`img`,{src:n.imageUrl,alt:n.name,className:`h-full w-full object-cover`}):(0,c.jsx)(s,{className:`h-10 w-10 text-gray-400`})}),(0,c.jsx)(r,{weight:`semibold`,className:`text-sm`,children:n.name}),(0,c.jsxs)(r,{className:`text-xs text-gray-500`,children:[n.productCount||0,` products`]})]},n.id))})]})}export{l as component};