1import{u as m,j as i}from"./index-cvSkj9Gc.js";import{u as h,U as o,F as g}from"./useAdminStats--lJrZYSx.js";import{C as r,b as t,c as a,a as s}from"./card-kUfaaxnq.js";import{U as u}from"./users-B_GuppMO.js";import{T as x}from"./triangle-alert-DqVARltb.js";import{R as f}from"./refresh-cw-BHJPvvxj.js";import{F as v}from"./flag-codJCRFU.js";import{I as j}from"./image-BgxEYL4P.js";import{T as k}from"./trending-up-B_vY8RNk.js";import{D as b}from"./dollar-sign-B3U1E1S-.js";import{F as A}from"./file-text-ggtzGlrL.js";import{C}from"./calendar-days-DbMj00UY.js";import{C as N}from"./calendar-clock-AnjsEHFb.js";import{C as T}from"./circle-x-CtQdT30R.js";import{Z as w}from"./zap-BEOIQ8ui.js";import"./useQuery-BaZlE4Aw.js";function H(){const{data:e,isLoading:d}=h(),l=m();if(d)return i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})});const c=[{title:"Pending Applications",value:(e==null?void 0:e.pendingApplications)||0,icon:o,description:"Awaiting review",link:"/admin/talent-applications",highlight:!1},{title:"Approved Talents",value:(e==null?void 0:e.approvedTalents)||0,icon:u,description:"Active talent pool",link:"/admin/talent-roster",highlight:!1},{title:"Chat Abuse Flags",value:(e==null?void 0:e.chatAbuseFlags)||0,icon:x,description:"Unreviewed flags",link:"/admin/projects",highlight:((e==null?void 0:e.chatAbuseFlags)||0)>0},{title:"Likeness Requests",value:(e==null?void 0:e.pendingLikenessRequests)||0,icon:f,description:"Pending retraining",link:"/admin/talent-roster",highlight:((e==null?void 0:e.pendingLikenessRequests)||0)>0},{title:"Content Reports",value:(e==null?void 0:e.pendingContentReports)||0,icon:v,description:"Pending review",link:"/admin/content-reports",highlight:((e==null?void 0:e.pendingContentReports)||0)>0},{title:"Total Workflows",value:(e==null?void 0:e.totalWorkflows)||0,icon:g,description:"Created by clients",highlight:!1},{title:"Total Generations",value:(e==null?void 0:e.totalGenerations)||0,icon:j,description:"All-time generations",highlight:!1},{title:"Monthly Generations",value:(e==null?void 0:e.monthlyGenerations)||0,icon:k,description:"This month",highlight:!1},{title:"Total Revenue",value:`$${((e==null?void 0:e.totalRevenue)||0).toLocaleString()}`,icon:b,description:"Lifetime earnings",highlight:!1}],p=[{title:"Total Applications",value:(e==null?void 0:e.totalApplications)||0,icon:A,description:"All-time, all statuses",link:"/admin/talent-applications"},{title:"This Week",value:(e==null?void 0:e.applicationsThisWeek)||0,icon:C,description:"Last 7 days"},{title:"This Month",value:(e==null?void 0:e.applicationsThisMonth)||0,icon:N,description:"Last 30 days"},{title:"Approved",value:(e==null?void 0:e.approvedTalents)||0,icon:o,description:"Accepted to roster"},{title:"Rejected",value:(e==null?void 0:e.rejectedApplications)||0,icon:T,description:"Declined applications"},{title:"Auto-Approved",value:(e==null?void 0:e.autoApprovedApplications)||0,icon:w,description:"Passed automated review"}];return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-3xl font-bold tracking-tight text-foreground",children:"Dashboard"}),i.jsx("p",{className:"text-muted-foreground",children:"Welcome to the Trueth Admin Portal"})]}),i.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:c.map(n=>i.jsxs(r,{className:`${n.link?"cursor-pointer transition-all hover:shadow-md hover:border-primary/50":""} ${n.highlight?"border-destructive/50 bg-destructive/5":""}`,onClick:n.link?()=>l(n.link):void 0,children:[i.jsxs(t,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(a,{className:"text-sm font-medium",children:n.title}),i.jsx(n.icon,{className:`h-4 w-4 ${n.highlight?"text-destructive":"text-muted-foreground"}`})]}),i.jsxs(s,{children:[i.jsx("div",{className:"text-2xl font-bold",children:n.value}),i.jsx("p",{className:"text-xs text-muted-foreground",children:n.description})]})]},n.title))}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-xl font-semibold tracking-tight text-foreground mb-4",children:"Application Pipeline"}),i.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:p.map(n=>i.jsxs(r,{className:n.link?"cursor-pointer transition-all hover:shadow-md hover:border-primary/50":"",onClick:n.link?()=>l(n.link):void 0,children:[i.jsxs(t,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[i.jsx(a,{className:"text-sm font-medium",children:n.title}),i.jsx(n.icon,{className:"h-4 w-4 text-muted-foreground"})]}),i.jsxs(s,{children:[i.jsx("div",{className:"text-2xl font-bold",children:n.value}),i.jsx("p",{className:"text-xs text-muted-foreground",children:n.description})]})]},n.title))})]})]})}export{H 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.