'use client'; import { motion } from 'framer-motion'; import { Users, Home, Calendar, DollarSign } from 'lucide-react'; import { useEffect, useState } from 'react'; export default function DashboardStats() { const [stats, setStats] = useState({ totalUsers: 0, totalProperties: 0, activeBookings: 0, totalRevenue: 0, pendingRequests: 0, availableProperties: 0 }); useEffect(() => { setStats({ totalUsers: 156, totalProperties: 89, activeBookings: 34, totalRevenue: 12500000, pendingRequests: 12, availableProperties: 45 }); }, []); const formatNumber = (num) => { return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }; const formatCurrency = (amount) => { return `${formatNumber(amount)} ل.س`; }; const cards = [ { title: 'إجمالي المستخدمين', value: stats.totalUsers, icon: Users, color: 'from-blue-600 to-blue-700', bgColor: 'bg-blue-100', iconColor: 'text-blue-600' }, { title: 'إجمالي العقارات', value: stats.totalProperties, icon: Home, color: 'from-emerald-600 to-emerald-700', bgColor: 'bg-emerald-100', iconColor: 'text-emerald-600' }, { title: 'الحجوزات النشطة', value: stats.activeBookings, icon: Calendar, color: 'from-purple-600 to-purple-700', bgColor: 'bg-purple-100', iconColor: 'text-purple-600' }, { title: 'الإيرادات', value: formatCurrency(stats.totalRevenue), icon: DollarSign, color: 'from-amber-600 to-amber-700', bgColor: 'bg-amber-100', iconColor: 'text-amber-600' } ]; return (