import React from 'react'; import { motion } from 'framer-motion'; import { GlassCard } from '@/components/ui/GlassCard'; import { Button } from '@/components/ui/button'; import { Progress } from '@/components/ui/progress'; import { Wallet, TrendingUp, Home, Car, Utensils, ShoppingCart, Target, ArrowRight, AlertCircle } from 'lucide-react'; import { cn, formatCurrency } from '@/lib/utils'; // Mock Data const budgetData = { limit: 15000, spent: 12500, categories: [ { name: 'Housing', icon: Home, spent: 6500, limit: 7000, color: 'bg-blue-500' }, { name: 'Food & Dining', icon: Utensils, spent: 2800, limit: 3000, color: 'bg-green-500' }, { name: 'Transportation', icon: Car, spent: 1200, limit: 1500, color: 'bg-orange-500' }, { name: 'Shopping', icon: ShoppingCart, spent: 2000, limit: 1500, color: 'bg-pink-500' }, // Over budget ], goals: [ { name: 'Buy a House', target: 800000, current: 200000, color: 'bg-purple-500' }, { name: 'Retirement', target: 2000000, current: 150000, color: 'bg-indigo-500' }, ] }; export default function BudgetManager() { const percentage = Math.min(100, (budgetData.spent / budgetData.limit) * 100); const circumference = 2 * Math.PI * 120; // Radius 120 const strokeDashoffset = circumference - (percentage / 100) * circumference; return (
{/* Header */}

Monthly Budget & Goals

Track your spending and save for the future.

{/* Main Budget Ring */}
{/* Background Circle */} {/* Progress Circle */} 90 ? "text-red-500" : percentage > 75 ? "text-orange-500" : "text-blue-500" )} />
Total Spent {formatCurrency(budgetData.spent)} of {formatCurrency(budgetData.limit)}
{percentage > 90 && ( You've used {percentage.toFixed(0)}% of your budget! )}
{/* Categories & Goals */}
{/* Categories Breakdown */}

Category Breakdown

{budgetData.categories.map((cat, index) => (
{cat.name}
{formatCurrency(cat.spent)} / {formatCurrency(cat.limit)}
))}
{/* Long-term Goals */}

Long-term Planning

{budgetData.goals.map((goal, index) => (

{goal.name}

On Track
Progress {Math.round((goal.current / goal.target) * 100)}%
{formatCurrency(goal.current)} {formatCurrency(goal.target)}
{/* Hover Effect Background */}
))}
); }