import{_ as i}from"./AppLayout-DWdPT5fa.js";import{c as n,a as t,t as e,k as r,l as x,h as c,e as m,m as b,F as u,r as _,o as d,n as g}from"./app-1ARj-ZIB.js";const f={class:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6"},h={class:"bg-white rounded-2xl p-5 shadow-sm border border-slate-100"},p={class:"text-3xl font-bold text-slate-800"},v={class:"bg-white rounded-2xl p-5 shadow-sm border border-slate-100"},w={class:"text-3xl font-bold text-green-600"},y={class:"bg-white rounded-2xl p-5 shadow-sm border border-slate-100"},k={class:"text-3xl font-bold text-indigo-600"},j={class:"bg-white rounded-2xl shadow-sm border border-slate-100 p-5"},T={class:"flex items-center justify-between mb-4"},A={key:0,class:"space-y-2"},B={class:"w-9 h-9 bg-indigo-100 rounded-xl flex items-center justify-center shrink-0"},N={class:"text-sm font-bold text-indigo-600"},V={class:"flex-1 min-w-0"},C={class:"text-sm font-medium text-slate-800"},D={class:"text-xs text-slate-500"},F={key:1,class:"text-sm text-slate-400 text-center py-8"},z=Object.assign({layout:i},{__name:"Dashboard",props:{stats:Object,recentTenants:Array},setup(o){return(l,s)=>(d(),n("div",null,[s[5]||(s[5]=t("div",{class:"mb-5"},[t("h1",{class:"text-xl font-bold text-slate-800"},"Super Admin — لوحة التحكم"),t("p",{class:"text-sm text-slate-500 mt-0.5"},"إدارة جميع الشركات والمستخدمين")],-1)),t("div",f,[t("div",h,[t("p",p,e(o.stats?.total_tenants??0),1),s[0]||(s[0]=t("p",{class:"text-sm text-slate-500 mt-1"},"إجمالي الشركات",-1))]),t("div",v,[t("p",w,e(o.stats?.active_tenants??0),1),s[1]||(s[1]=t("p",{class:"text-sm text-slate-500 mt-1"},"شركات نشطة",-1))]),t("div",y,[t("p",k,e(o.stats?.total_users??0),1),s[2]||(s[2]=t("p",{class:"text-sm text-slate-500 mt-1"},"إجمالي المستخدمين",-1))])]),t("div",j,[t("div",T,[s[4]||(s[4]=t("h3",{class:"font-semibold text-slate-800"},"آخر الشركات المضافة",-1)),r(m(b),{href:l.route("super-admin.tenants.index"),class:"text-sm text-indigo-600 font-medium"},{default:x(()=>[...s[3]||(s[3]=[c("عرض الكل",-1)])]),_:1},8,["href"])]),o.recentTenants?.length?(d(),n("div",A,[(d(!0),n(u,null,_(o.recentTenants,a=>(d(),n("div",{key:a.id,class:"flex items-center gap-4 p-3 rounded-xl hover:bg-slate-50"},[t("div",B,[t("span",N,e(a.name?.charAt(0)),1)]),t("div",V,[t("p",C,e(a.name),1),t("p",D,e(a.slug),1)]),t("span",{class:g(["text-xs px-2 py-1 rounded-lg font-medium",a.is_active?"bg-green-100 text-green-700":"bg-red-100 text-red-700"])},e(a.is_active?"نشط":"معطل"),3)]))),128))])):(d(),n("p",F,"لا توجد شركات بعد."))])]))}});export{z as default};
