import{a as p,j as a,H as h}from"./app-2gKhTNh_.js";import{A as f}from"./AdminKampusLayout-QLddaMo-.js";import{n as u,u as n,v as b,w as m,x as c,f as x,y as j,F as r,z as _,A as k}from"./index-DQiLWVLj.js";import"./sweetalert2.esm.all-NNS-RXd7.js";import"./proxy-N6hiut4S.js";const e=({title:d,value:s,icon:o,gradient:l,footerText:t,subValue:i})=>a.jsxs("div",{className:`
        ${l} 
        text-white p-6 rounded-2xl shadow-xl transition duration-500 
        transform hover:scale-[1.03] hover:shadow-2xl 
        cursor-pointer flex flex-col justify-between h-full
    `,children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-light opacity-80 uppercase tracking-wider",children:d}),a.jsx("p",{className:"text-5xl font-extrabold mt-2 leading-none",children:s}),i&&a.jsx("p",{className:"text-sm opacity-90 mt-1",children:i})]}),a.jsx("div",{className:"p-3 bg-white bg-opacity-20 rounded-xl",children:a.jsx(r,{icon:o,className:"w-6 h-6"})})]}),t&&a.jsx("div",{className:"mt-4 pt-3 border-t border-white border-opacity-30 text-xs opacity-90",children:t})]});function T(d){const{auth:s,campusStats:o}=p().props,l=s.user,t=o||{total_news:0,published_news:0,draft_news:0,total_alumni:0,total_facilities:0,active_facilities:0,total_sistem_perkuliahan:0,total_gallery_items:0,total_curriculum_items:0};return a.jsxs(f,{header:`Dashboard Kampus: ${l.name}`,children:[a.jsx(h,{title:"Dashboard Admin Kampus"}),a.jsxs("div",{className:"max-w-7xl mx-auto space-y-8",children:[a.jsx("h2",{className:"text-3xl font-extrabold text-gray-900 pb-2",children:"Ringkasan Kampus Digital"}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[a.jsx(e,{title:"Berita Terpublikasi",value:t.published_news,icon:u,subValue:`${t.draft_news} Draft menunggu`,gradient:"bg-gradient-to-br from-red-600 to-orange-500",footerText:`Total ${t.total_news} konten berita`}),a.jsx(e,{title:"Fasilitas Aktif",value:t.active_facilities,icon:n,subValue:`Dari ${t.total_facilities} terdaftar`,gradient:"bg-gradient-to-br from-green-600 to-teal-500",footerText:"Cek ketersediaan fasilitas"}),a.jsx(e,{title:"Total Alumni",value:t.total_alumni,icon:b,gradient:"bg-gradient-to-br from-purple-600 to-pink-500",footerText:"Data Tracer Study Tervalidasi"}),a.jsx(e,{title:"Sistem Perkuliahan",value:t.total_sistem_perkuliahan,icon:m,gradient:"bg-gradient-to-br from-gray-700 to-gray-500",footerText:"Jumlah model/fitur perkuliahan"}),a.jsx(e,{title:"Galeri Foto",value:t.total_gallery_items,icon:c,gradient:"bg-gradient-to-br from-yellow-600 to-amber-400",footerText:"Total foto yang diunggah"}),a.jsx(e,{title:"Kurikulum",value:t.total_curriculum_items,icon:x,gradient:"bg-gradient-to-br from-cyan-600 to-sky-400",footerText:"Jumlah kurikulum terdaftar"}),a.jsx(e,{title:"Berita Draft",value:t.draft_news,icon:j,gradient:"bg-gradient-to-br from-orange-400 to-red-400",footerText:"Perlu review dan publikasi"})]}),a.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 pt-4",children:a.jsxs("div",{className:"bg-white p-6 rounded-2xl shadow-xl border border-gray-100 lg:col-span-2",children:[a.jsxs("h3",{className:"text-xl font-bold text-gray-800 mb-5 flex items-center",children:[a.jsx(r,{icon:_,className:"mr-3 text-indigo-500"}),"Aksi Cepat"]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:[{route:"admin.kampus.berita.index",icon:u,text:`Kelola Berita (${t.total_news})`},{route:"admin.kampus.jurusan.index",icon:n,text:"Kelola Jurusan & Biaya Kuliah"},{route:"admin.kampus.fasilitas.index",icon:n,text:`Kelola Fasilitas (${t.total_facilities})`},{route:"admin.kampus.sistem_perkuliahan.index",icon:m,text:`Kelola Sistem Perkuliahan (${t.total_sistem_perkuliahan})`},{route:"admin.kampus.kurikulum.index",icon:x,text:`Kelola Kurikulum (${t.total_curriculum_items})`},{route:"admin.kampus.galeri.index",icon:c,text:`Kelola Galeri Foto (${t.total_gallery_items})`}].map((i,g)=>a.jsxs("a",{href:route(i.route)||"#",className:"flex items-center p-4 rounded-lg bg-gray-50 hover:bg-indigo-50 hover:text-indigo-700 transition duration-200 group border border-transparent hover:border-indigo-200 shadow-sm",children:[a.jsx(r,{icon:i.icon,className:"mr-3 text-indigo-500 group-hover:text-indigo-700 w-5 h-5"}),a.jsx("span",{className:"font-semibold text-gray-700 group-hover:text-indigo-700 flex-grow",children:i.text}),a.jsx(r,{icon:k,className:"ml-2 w-3 h-3 text-gray-400 group-hover:text-indigo-700 transition-transform group-hover:translate-x-1"})]},g))})]})})]})]})}export{T as default};
