1import{bL as N,bV as b,bJ as v,bM as w,bp as e,C as d,af as x,k as m,b as y,aI as f,a3 as n,d as g,l as h,aK as k,ag as C}from"./index-Bz4x43kN.js";import{S as c}from"./skeleton-B5u9x4rk.js";import{M as p}from"./mail-C8iJO0nG.js";import{P as I}from"./plus-DktfV83D.js";import{E as L}from"./eye-DY-tXWqI.js";import{D}from"./download-btkOFYqE.js";const S={resume:{icon:n,label:"Resume",color:"bg-blue-100 text-blue-700"},cover_letter:{icon:p,label:"Cover Letter",color:"bg-green-100 text-green-700"},linkedin_profile:{icon:C,label:"LinkedIn",color:"bg-indigo-100 text-indigo-700"},match_score:{icon:k,label:"Match Score",color:"bg-orange-100 text-orange-700"},interview_prep:{icon:f,label:"Interview Prep",color:"bg-purple-100 text-purple-700"}};function T({document:a,clientId:l}){const i=S[a.docType]||{icon:n,label:a.docType,color:"bg-gray-100 text-gray-700"},r=i.icon,s=t=>new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return e.jsx(d,{className:"hover:shadow-md transition-shadow",children:e.jsx(h,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg flex items-center justify-center ${i.color}`,children:e.jsx(r,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:a.title}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Updated ",s(a.updatedAt)]}),e.jsx(g,{variant:"secondary",className:"mt-1 text-xs",children:i.label})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(m,{variant:"ghost",size:"icon",children:e.jsx(L,{className:"h-4 w-4"})}),e.jsx(m,{variant:"ghost",size:"icon",children:e.jsx(D,{className:"h-4 w-4"})})]})]})})})}function j({title:a,description:l,icon:i,href:r}){return e.jsx(x,{href:r,children:e.jsx(d,{className:"cursor-pointer hover:shadow-md transition-all border-dashed hover:border-solid hover:border-primary/50",children:e.jsx(h,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-muted flex items-center justify-center",children:e.jsx(i,{className:"h-5 w-5 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"font-medium flex items-center gap-2",children:[e.jsx(I,{className:"h-4 w-4"}),a]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:l})]})]})})})})}function A(){const{clientId:a}=N(),{workspace:l,setActiveClient:i}=b();v();const r=a?parseInt(a):null,s=l==null?void 0:l.clients.find(o=>o.id===r),{data:t,isLoading:u}=w({queryKey:["/api/agency/clients",r,"documents"],enabled:!!r});return r?l?e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx(x,{href:"/workspace",children:e.jsxs(m,{variant:"ghost",size:"sm",className:"mb-4",children:[e.jsx(y,{className:"h-4 w-4 mr-2"}),"Back to Workspace"]})}),e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center ${s!=null&&s.isSelfClient?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:s!=null&&s.isSelfClient?e.jsx(f,{className:"h-6 w-6"}):e.jsx(n,{className:"h-6 w-6"})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[(s==null?void 0:s.clientName)||"Client",(s==null?void 0:s.isSelfClient)&&e.jsx(g,{variant:"secondary",children:"You"})]}),(s==null?void 0:s.targetJobTitle)&&e.jsx("p",{className:"text-muted-foreground",children:s.targetJobTitle})]})]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Quick Create"}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(j,{title:"New Resume",description:"Build a professional resume",icon:n,href:"/toolkit/resume"}),e.jsx(j,{title:"Cover Letter",description:"Generate matching cover letter",icon:p,href:"/toolkit/cover-letter"})]})]}),e.jsxs("div",{children:[e.jsxs("h2",{className:"text-lg font-semibold mb-4",children:["Documents ",t&&t.length>0&&`(${t.length})`]}),u?e.jsxs("div",{className:"space-y-3",children:[e.jsx(c,{className:"h-20 w-full"}),e.jsx(c,{className:"h-20 w-full"})]}):t&&t.length>0?e.jsx("div",{className:"space-y-3",children:t.map(o=>e.jsx(T,{document:o,clientId:r},o.id))}):e.jsx(d,{className:"border-dashed",children:e.jsxs(h,{className:"p-8 text-center",children:[e.jsx(n,{className:"h-12 w-12 mx-auto text-muted-foreground
1/50 mb-3"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"No documents yet. Create your first document above."})]})})]})]})}):e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[e.jsx(c,{className:"h-8 w-48 mb-6"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(c,{className:"h-24 w-full"}),e.jsx(c,{className:"h-24 w-full"})]})]})}):e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsxs(d,{className:"p-6 text-center",children:[e.jsx("p",{className:"text-muted-foreground",children:"Invalid client ID"}),e.jsx(x,{href:"/workspace",children:e.jsx(m,{className:"mt-4",children:"Back to Workspace"})})]})})}export{A 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.