(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81749,e=>{"use strict";var r=e.i(43476),a=e.i(71645),s=e.i(7471),t=e.i(88844),o=e.i(50965),d=e.i(61911);let l=(0,e.i(75254).default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);var n=e.i(22016);function i(){let[e,i]=(0,a.useState)({products:0,orders:0,users:0}),[c,g]=(0,a.useState)(!0);(0,a.useEffect)(()=>{!async function(){let[{count:e},{count:r},{count:a}]=await Promise.all([s.supabase.from("products").select("*",{count:"exact",head:!0}),s.supabase.from("orders").select("*",{count:"exact",head:!0}),s.supabase.from("users").select("*",{count:"exact",head:!0})]);i({products:e||0,orders:r||0,users:a||0}),g(!1)}()},[]);let u=[{label:"Total Products",value:e.products,icon:t.Package,colorClass:"bg-blue-50 text-blue-600",href:"/dnt/login/admin/dashboard/products"},{label:"Total Orders",value:e.orders,icon:o.ShoppingBag,colorClass:"bg-purple-50 text-purple-600",href:"/dnt/login/admin/dashboard/orders"},{label:"Registered Users",value:e.users,icon:d.Users,colorClass:"bg-green-50 text-green-600",href:"/dnt/login/admin/dashboard/users"},{label:"Active Today",value:"—",icon:l,colorClass:"bg-orange-50 text-orange-600",href:"#"}];return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-gray-900 tracking-tight",children:"Dashboard Overview"}),(0,r.jsx)("p",{className:"text-gray-500 text-sm mt-1",children:"Welcome back. Here's what's happening in your store today."})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-6",children:u.map(({label:e,value:a,icon:s,colorClass:t,href:o})=>(0,r.jsxs)(n.default,{href:o,className:"bg-white border border-gray-200 rounded-2xl p-6 shadow-sm hover:shadow-md hover:border-brand-primary/30 transition-all group",children:[(0,r.jsx)("div",{className:`w-12 h-12 rounded-xl flex items-center justify-center mb-5 transition-transform group-hover:scale-110 ${t}`,children:(0,r.jsx)(s,{className:"w-6 h-6"})}),(0,r.jsx)("p",{className:"text-gray-500 text-xs font-medium mb-1 uppercase tracking-wider",children:e}),(0,r.jsx)("p",{className:"text-3xl font-bold text-gray-900 group-hover:text-brand-primary transition-colors",children:c?(0,r.jsx)("span",{className:"text-gray-300",children:"..."}):a})]},e))}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 sm:gap-6 mt-4",children:[{href:"/dnt/login/admin/dashboard/products",label:"Manage Products",desc:"Add, edit or delete products from your catalog"},{href:"/dnt/login/admin/dashboard/carousel",label:"Manage Carousel",desc:"Update homepage hero slider content and links"},{href:"/dnt/login/admin/dashboard/settings",label:"Store Settings",desc:"Configure logo, brand colors, and payment gateway keys"}].map(({href:e,label:a,desc:s})=>(0,r.jsxs)(n.default,{href:e,className:"bg-white border border-gray-200 rounded-2xl p-6 shadow-sm hover:shadow-md hover:border-brand-primary/30 transition-all group",children:[(0,r.jsx)("p",{className:"font-semibold text-gray-900 group-hover:text-brand-primary transition-colors mb-2",children:a}),(0,r.jsx)("p",{className:"text-gray-500 text-sm leading-relaxed",children:s})]},e))})]})}e.s(["default",()=>i],81749)}]);