import { IconTrendingUp, IconTrendingDown } from "@tabler/icons-react" import { Badge } from "@/components/ui/badge" import { Card, CardAction, CardDescription, CardFooter, CardHeader, CardTitle, } from "@/components/ui/card" type DashboardStats = { totalAppointments: number appointmentChange: number newPatients: number patientChange: number revenue: number revenueChange: number satisfactionRate: number satisfactionChange: number } export function SectionCards({ stats }: { stats: DashboardStats }) { return (
Total Appointments {stats.totalAppointments.toLocaleString()} {stats.appointmentChange >= 0 ? : } {stats.appointmentChange >= 0 ? '+' : ''}{stats.appointmentChange.toFixed(1)}%
{stats.appointmentChange >= 0 ? 'Bookings up this month' : 'Bookings down this month'}{' '} {stats.appointmentChange >= 0 ? : }
Appointments for the last 30 days
New Patients {stats.newPatients.toLocaleString()} {stats.patientChange >= 0 ? : } {stats.patientChange >= 0 ? '+' : ''}{stats.patientChange.toFixed(1)}%
{stats.patientChange >= 0 ? 'Growing patient base' : 'Patient growth slowing'}{' '} {stats.patientChange >= 0 ? : }
New registrations this month
Revenue This Month ₱{stats.revenue.toLocaleString('en-PH', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} {stats.revenueChange >= 0 ? : } {stats.revenueChange >= 0 ? '+' : ''}{stats.revenueChange.toFixed(1)}%
{stats.revenueChange >= 0 ? 'Strong financial performance' : 'Revenue needs attention'}{' '} {stats.revenueChange >= 0 ? : }
Total revenue collected
Patient Satisfaction {stats.satisfactionRate.toFixed(1)}% {stats.satisfactionChange >= 0 ? : } {stats.satisfactionChange >= 0 ? '+' : ''}{stats.satisfactionChange.toFixed(1)}%
{stats.satisfactionRate >= 95 ? 'Excellent patient feedback' : 'Good patient feedback'}{' '} {stats.satisfactionChange >= 0 ? : }
Based on completed appointments
) }