1import{j as e,R as u}from"./animation-CddyXVCz.js";import{D as d,B as x,cp as f,s as n,cv as h}from"./index-DnWsV7cE.js";import{W as c,d as m,M as o}from"./DashboardDemo-BrkrB_1p.js";import"./react-vendor-CbN3pvl2.js";import"./supabase-iKSPld20.js";import"./docgen-Bp8WKBAE.js";import"./query-DPqpbKNH.js";const _=()=>{const r=d(),i=[{mode:"job_hunting",icon:o.job_hunting.icon,title:o.job_hunting.label,desc:o.job_hunting.description,path:"/app/search",color:"indigo"},{mode:"building_profile",icon:o.building_profile.icon,title:o.building_profile.label,desc:o.building_profile.description,path:"/app/profile",color:"green"},{mode:"managing_portfolio",icon:o.managing_portfolio.icon,title:o.managing_portfolio.label,desc:o.managing_portfolio.description,path:"/app/profile",color:"purple"}];return e.jsxs(c,{className:"md:col-span-2 lg:col-span-3",children:[e.jsx(m,{title:"What would you like to do today?",icon:"ð¯"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-4 min-w-0",children:i.map(t=>e.jsxs(x,{onClick:()=>r(t.path),variant:"ghost",size:"md",className:"flex flex-col items-start gap-3 p-4 rounded-xl bg-gradient-to-br from-gray-50 to-white dark:from-slate-800 dark:to-slate-700 border border-gray-200 dark:border-slate-600 hover:shadow-lg hover:scale-105 transition-all h-auto border-none justify-start min-w-0 w-full overflow-hidden",children:[e.jsx("span",{className:"text-4xl flex-shrink-0",children:t.icon}),e.jsxs("div",{className:"text-left font-normal min-w-0 w-full break-words",children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white mb-1 break-words",children:t.title}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 break-words",children:t.desc})]})]},t.mode))})]})},P=()=>{const r=d(),[i,t]=u.useState([{label:"Saved Jobs",value:"-",icon:"ð¾"},{label:"Applications",value:"-",icon:"ð"},{label:"Profile Score",value:"-",icon:"ð"}]);return u.useEffect(()=>{(async()=>{try{const s=await f();if(!s)return;const[p,g,l]=await Promise.all([n?n.from("saved_jobs").select("id",{count:"exact",head:!0}).eq("user_id",s.id):Promise.resolve({count:0}),n?n.from("applied_jobs").select("id",{count:"exact",head:!0}).eq("user_id",s.id):Promise.resolve({count:0}),h(s.id)]);let a=0;l&&(l.fullName&&(a+=20),l.headline&&(a+=20),l.summary&&(a+=20),l.location&&(a+=20),a+=20),t([{label:"Saved Jobs",value:String(p.count||0),icon:"ð¾"},{label:"Applications",value:String(g.count||0),icon:"ð"},{label:"Profile",value:`${a}%`,icon:"ð"}])}catch(s){console.error("Error fetching dashboard stats:",s)}})()},[]),e.jsxs(c,{children:[e.jsx(m,{title:"Quick Stats",icon:"ð"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"grid grid-cols-3 gap-3 mt-4 min-w-0",children:[e.jsxs("button",{type:"button",onClick:()=>r("/app/saved-jobs"),className:"p-4 rounded-xl bg-indigo-50/50 dark:bg-indigo-900/10 border border-indigo-100 dark:border-indigo-800/30 text-center hover:bg-indigo-50 dark:hover:bg-indigo-900/20 transition-colors min-w-0 overflow-hidden w-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-indigo-500",children:[e.jsx("div",{className:"text-3xl mb-2 filter drop-shadow-sm",children:"ð¾"}),e.jsx("div",{className:"text-2xl font-bold text-indigo-700 dark:text-indigo-300 truncate",title:i[0].value,children:i[0].value}),e.jsx("div",{className:"text-xs text-indigo-600 dark:text-indigo-400 font-semibold mt-1 break-words",children:"Saved Jobs"})]}),e.jsxs("button",{type:"button",onClick:()=>r("/app/applications"),className:"p-4 rounded-xl bg-blue-50/50 dark:bg-blue-900/10 border border-blue-100 dark:border-blue-800/30 text-center hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-colors min-w-0 overflow-hidden w-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-blue-500",children:[e.jsx("div",{className:"text-3xl mb-2 filter drop-shadow-sm",children:"ð"}),e.jsx("div",{className:"text-2xl font-bold text-blue-700 dark:text-blue-300 truncate",title:i[1].value,children:i[1].value}
1),e.jsx("div",{className:"text-xs text-blue-600 dark:text-blue-400 font-semibold mt-1 break-words",children:"Applications"})]}),e.jsxs("button",{type:"button",onClick:()=>r("/app/profile"),className:"p-4 rounded-xl bg-emerald-50/50 dark:bg-emerald-900/10 border border-emerald-100 dark:border-emerald-800/30 text-center hover:bg-emerald-50 dark:hover:bg-emerald-900/20 transition-colors min-w-0 overflow-hidden w-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-emerald-500",children:[e.jsx("div",{className:"text-3xl mb-2 filter drop-shadow-sm",children:"ð"}),e.jsx("div",{className:"text-2xl font-bold text-emerald-700 dark:text-emerald-300 truncate",title:i[2].value,children:i[2].value}),e.jsx("div",{className:"text-xs text-emerald-600 dark:text-emerald-400 font-semibold mt-1 break-words",children:"Profile Score"})]})]})})]})},C=()=>{const r=d(),i=[{icon:"ð¯",title:"Complete your profile",desc:"Get better job matches",action:"Get Started",path:"/app/profile"},{icon:"ð",title:"Upload your resume",desc:"Enable AI-powered tailoring",action:"Upload",path:"/app/tailor"},{icon:"ð",title:"Search for jobs",desc:"Find your next opportunity",action:"Search",path:"/app/search"}];return e.jsxs(c,{className:"md:col-span-2",children:[e.jsx(m,{title:"Personalized Suggestions",icon:"ð¡"}),e.jsx("div",{className:"space-y-3",children:i.map((t,b)=>e.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-lg bg-gray-50 dark:bg-slate-700 border border-gray-200 dark:border-slate-600 min-w-0",children:[e.jsx("span",{className:"text-3xl flex-shrink-0",children:t.icon}),e.jsxs("div",{className:"flex-1 min-w-0 overflow-hidden",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white break-words",children:t.title}),e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 break-words",children:t.desc})]}),e.jsx(x,{onClick:()=>r(t.path),variant:"primary",size:"md",className:"flex-shrink-0",children:t.action})]},b))})]})};export{C as PersonalizedSuggestionsWidget,P as QuickStatsWidget,_ as WhatToDoWidget};
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.