import{r as e,t}from"./jsx-runtime-BbTa8W_M-1776590214964.js";import{o as n,r}from"./app-CXDQ5oEH-1776590214964.js";import{t as i}from"./useTranslation-D1etqd9u-1776590214964.js";import{t as a}from"./building-2-DclC7BZO-1776590214964.js";import{t as o}from"./message-square-CgLZQrab-1776590214964.js";import{t as s}from"./star-wSlMsd-z-1776590214964.js";import{t as c}from"./store-CIvuFgNB-1776590214964.js";import{t as l}from"./button-WiAFyHfP-1776590214964.js";import{n as u,t as d}from"./card-Cby8flFO-1776590214964.js";e();var f=t();function p({seller:e,storeMetrics:t={},setIsContactOpen:p}){let{auth:m}=n().props,{t:h}=i(),g=m.user?.id===e?.id,_=t?.avg_rating||0,v=t?.response_time||`N/A`,y=t?.store_views||0,b=e?.store_avatar_path?`/storage/${e.store_avatar_path}`:e?.avatar_path?`/storage/${e.avatar_path}`:null,x=e?.store_cover_path?`/storage/${e.store_cover_path}`:e?.cover_path?`/storage/${e.cover_path}`:null;return(0,f.jsxs)(d,{className:`shadow-sm border-border/50 sticky top-24 overflow-hidden`,children:[(0,f.jsx)(`div`,{className:`h-28 w-full bg-muted bg-cover bg-center`,style:{backgroundImage:x?`url(${x})`:`linear-gradient(to right, #0f172a, #334155)`}}),(0,f.jsxs)(u,{className:`p-6 pt-0`,children:[(0,f.jsx)(`div`,{className:`flex justify-start -mt-10 mb-4`,children:(0,f.jsx)(`div`,{className:`w-20 h-20 bg-white rounded-2xl border-4 border-card shadow-sm flex items-center justify-center overflow-hidden shrink-0`,children:b?(0,f.jsx)(`img`,{src:b,className:`w-full h-full object-cover`,alt:e?.company_name||e?.name}):(0,f.jsx)(a,{className:`w-10 h-10 text-muted-foreground/30`})})}),(0,f.jsxs)(`div`,{className:`mb-4 border-b pb-4`,children:[(0,f.jsx)(`h3`,{className:`font-bold text-lg leading-tight truncate`,title:e?.company_name||e?.name,children:e?.company_name||e?.name||h(`Verified Supplier`)}),e?.country?.name&&(0,f.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1 flex items-center gap-1.5`,children:[(0,f.jsx)(c,{className:`w-3.5 h-3.5`}),` `,e.country.name]})]}),(0,f.jsxs)(`div`,{className:`space-y-3 mb-6 text-sm`,children:[(0,f.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,f.jsx)(`span`,{className:`text-muted-foreground`,children:h(`Store Rating`)}),(0,f.jsxs)(`span`,{className:`font-medium text-amber-500 flex items-center gap-1`,children:[(0,f.jsx)(s,{className:`w-3.5 h-3.5 fill-amber-500`}),_>0?_:h(`New`)]})]}),(0,f.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,f.jsx)(`span`,{className:`text-muted-foreground`,children:h(`Response Time`)}),(0,f.jsx)(`span`,{className:`font-medium`,children:v})]}),g&&(0,f.jsxs)(`div`,{className:`flex justify-between items-center animate-in fade-in`,children:[(0,f.jsx)(`span`,{className:`text-muted-foreground`,children:h(`Store Views`)}),(0,f.jsx)(`span`,{className:`font-bold text-primary`,children:y})]})]}),(0,f.jsxs)(`div`,{className:`space-y-2`,children:[!g&&(0,f.jsxs)(l,{variant:`outline`,className:`w-full gap-2 rounded-lg font-bold border-primary/30 text-primary hover:bg-primary/5`,onClick:()=>p(!0),children:[(0,f.jsx)(o,{className:`w-4 h-4`}),` `,h(`Contact Supplier`)]}),(0,f.jsx)(l,{variant:g?`outline`:`secondary`,className:`w-full gap-2 rounded-lg font-bold ${g?``:`bg-muted hover:bg-muted/80`}`,asChild:!0,children:(0,f.jsxs)(r,{href:route(`store.view`,e?.store_slug||e?.username||``),children:[(0,f.jsx)(c,{className:`w-4 h-4`}),` `,h(`Visit Store`)]})})]})]})]})}export{p as default};