1import{u as c,C as i,j as r,s as o}from"./index-CdxQjZ9f.js";import{C as d,a as u,b as m,c as x}from"./card-CIb9IHlC.js";import{S as b,A as f}from"./AdminLayout-DfgX0Z5J.js";import{M as p}from"./mail-CtCRSXgK.js";import{U as h}from"./users-CSG46knm.js";import"./chevron-left-BbMit-kU.js";import"./calendar-clock-COQNDUhA.js";import"./search-BGP8UhtH.js";function q(){const{data:e}=c({queryKey:["admin-stats"],queryFn:async()=>{const[s,a,l,n]=await Promise.all([o.from("events").select("id",{count:"exact",head:!0}),o.from("orders").select("id",{count:"exact",head:!0}),o.from("contact_messages").select("id",{count:"exact",head:!0}),o.from("newsletter_subscribers").select("id",{count:"exact",head:!0})]);return{events:s.count??0,orders:a.count??0,contacts:l.count??0,subscribers:n.count??0}}}),t=[{label:"Events",value:(e==null?void 0:e.events)??0,icon:i,color:"text-blue-600"},{label:"Bestellungen",value:(e==null?void 0:e.orders)??0,icon:b,color:"text-green-600"},{label:"Anfragen",value:(e==null?void 0:e.contacts)??0,icon:p,color:"text-orange-600"},{label:"Newsletter",value:(e==null?void 0:e.subscribers)??0,icon:h,color:"text-purple-600"}];return r.jsxs(f,{children:[r.jsx("h1",{className:"text-2xl font-display font-bold text-foreground mb-6",children:"Dashboard"}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:t.map(s=>r.jsxs(d,{children:[r.jsxs(u,{className:"flex flex-row items-center justify-between pb-2",children:[r.jsx(m,{className:"text-sm font-medium text-muted-foreground",children:s.label}),r.jsx(s.icon,{className:`w-5 h-5 ${s.color}`})]}),r.jsx(x,{children:r.jsx("p",{className:"text-3xl font-bold text-foreground",children:s.value})})]},s.label))})]})}export{q 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.