import{jsxs as e,jsx as t}from"react/jsx-runtime";import{C as s,b as i,c as d,a as o}from"./card-Zg0WOx-j.js";import{HardDrive as c,FileArchive as m,Calendar as n}from"lucide-react";import"./utils-CMbmcP35.js";import"clsx";import"tailwind-merge";function b({diskUsage:a,backups:l}){return e("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:[e(s,{className:"bg-gradient-to-br from-blue-500 to-blue-600 border-0 shadow-lg shadow-blue-500/25",children:[e(i,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(d,{className:"text-sm font-medium text-blue-100",children:"Disk Usage"}),t(c,{className:"h-4 w-4 text-blue-200"})]}),e(o,{children:[t("div",{className:"text-2xl font-bold text-white",children:a.total_size}),e("p",{className:"text-xs text-blue-100",children:[a.total_files," files"]}),t("p",{className:"text-xs text-blue-200 mt-1",children:a.directory})]})]}),e(s,{className:"bg-gradient-to-br from-violet-500 to-purple-600 border-0 shadow-lg shadow-purple-500/25",children:[e(i,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(d,{className:"text-sm font-medium text-purple-100",children:"Total Backups"}),t(m,{className:"h-4 w-4 text-purple-200"})]}),e(o,{children:[t("div",{className:"text-2xl font-bold text-white",children:l.length}),e("p",{className:"text-xs text-purple-100",children:[l.filter(r=>r.type==="full").length," Full, ",l.filter(r=>r.type==="mysql").length," MySQL, ",l.filter(r=>r.type==="directory").length," directories"]})]})]}),e(s,{className:"bg-gradient-to-br from-emerald-500 to-emerald-600 border-0 shadow-lg shadow-emerald-500/25",children:[e(i,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(d,{className:"text-sm font-medium text-emerald-100",children:"Last Backup"}),t(n,{className:"h-4 w-4 text-emerald-200"})]}),e(o,{children:[t("div",{className:"text-2xl font-bold text-white",children:l.length>0?new Date(l[0].created_at).toLocaleDateString():"N/A"}),t("p",{className:"text-xs text-emerald-100",children:l.length>0?new Date(l[0].created_at).toLocaleTimeString():"No backups yet"})]})]})]})}export{b as BackupStats};
