1import{fP as d,fM as m,fk as u,e9 as r,bc as x,c0 as p,d0 as g,e8 as f,ep as v,dc as h}from"./index-D2yE0WFs.js";import{u as k}from"./useWorkerProfile-CTow9ngc.js";const j=(s,i)=>`${v("worker-card-image")}?slug=${encodeURIComponent(s)}&v=${h(i)}`,y=()=>{const{slug:s}=d(),i=m(),{worker:e,creator:t,isLoading:n,error:l}=k(s||""),{user:a}=u();if(n)return r.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:r.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[r.jsx(x,{className:"h-10 w-10 animate-spin text-primary"}),r.jsx("p",{className:"text-muted-foreground",children:"Loading cardâ¦"})]})});if(l||!e||!s)return r.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:r.jsxs("div",{className:"text-center space-y-3 max-w-md",children:[r.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Worker card not found"}),r.jsx("p",{className:"text-muted-foreground",children:"This public card is unavailable."})]})});const o=`${e.name}${e.role?` - ${e.role}`:""} Card | Workait`,c=e.description||e.expertise||`${e.name} on Workait.`;return r.jsxs("main",{className:"bg-background text-primary-foreground",children:[r.jsx(p,{title:o,description:c,path:`/worker/${e.slug}/card`,ogImage:j(e.slug,e.avatar_url),ogType:"profile"}),r.jsx("h1",{className:"sr-only",children:o}),r.jsx(g,{worker:{id:e.id,name:e.name,role:e.role||void 0,avatar_url:e.avatar_url||void 0,skills:e.skills||[],expertise:e.expertise||void 0,description:e.description||void 0,slug:e.slug},open:!0,mode:"page",onClose:()=>i(`/worker/${e.slug}`),creatorName:(t==null?void 0:t.display_name)||void 0,sharePerspective:a!=null&&a.id&&a.id===e.creator_id?"creator":"neutral",publiclyListed:f(e)})]})};export{y 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.