import React, { useState } from 'react'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Progress } from '@/components/ui/progress'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { PiggyBank, TrendingUp, AlertTriangle, CheckCircle, Search, IndianRupee, Calendar, Zap, Target, ShoppingBag, Smartphone, Tv, Car } from 'lucide-react'; const SavingsBooster: React.FC = () => { const savingsOverview = { monthlySavings: 45000, // ₹45K potentialSavings: 18500, // ₹18.5K additional possible yearlyProjection: 540000, // ₹5.4L savingsRate: 36 // 36% }; const duplicateSubscriptions = [ { service: 'Music Streaming', subscriptions: ['Spotify Premium', 'YouTube Music'], monthlyCost: 358, recommendation: 'Keep Spotify, cancel YouTube Music', potentialSaving: 149 }, { service: 'Cloud Storage', subscriptions: ['Google Drive 200GB', 'iCloud 200GB'], monthlyCost: 390, recommendation: 'Consolidate to Google Drive only', potentialSaving: 195 }, { service: 'Food Delivery', subscriptions: ['Swiggy One', 'Zomato Pro'], monthlyCost: 398, recommendation: 'Choose based on usage patterns', potentialSaving: 199 } ]; const savingOpportunities = [ { category: 'Subscriptions', icon: , currentSpend: 2500, potentialSaving: 800, opportunities: [ { item: 'Unused Hotstar VIP', saving: 299, action: 'Cancel' }, { item: 'Multiple news apps', saving: 350, action: 'Consolidate' }, { item: 'Gym membership (unused)', saving: 1500, action: 'Cancel or use' } ], color: 'from-purple-400 to-purple-600' }, { category: 'Utilities', icon: , currentSpend: 3200, potentialSaving: 600, opportunities: [ { item: 'Switch to LED bulbs', saving: 200, action: 'Upgrade' }, { item: 'Optimize AC usage', saving: 400, action: 'Schedule' } ], color: 'from-yellow-400 to-yellow-600' }, { category: 'Transportation', icon: , currentSpend: 8500, potentialSaving: 2100, opportunities: [ { item: 'Use metro instead of cab', saving: 1200, action: 'Plan routes' }, { item: 'Carpool for office', saving: 900, action: 'Find colleagues' } ], color: 'from-blue-400 to-blue-600' }, { category: 'Shopping', icon: , currentSpend: 12000, potentialSaving: 3500, opportunities: [ { item: 'Buy groceries in bulk', saving: 1500, action: 'Plan weekly' }, { item: 'Use cashback credit cards', saving: 800, action: 'Switch cards' }, { item: 'Compare prices online', saving: 1200, action: 'Use apps' } ], color: 'from-green-400 to-green-600' } ]; const alternativeServices = [ { current: 'Netflix Premium', currentCost: 649, alternative: 'Netflix Basic + Regional OTT', alternativeCost: 348, savings: 301, features: 'Similar content library with regional shows' }, { current: 'Uber/Ola Regular', currentCost: 4500, alternative: 'Metro + Occasional ride', alternativeCost: 2200, savings: 2300, features: 'Faster commute during rush hours' }, { current: 'Branded groceries', currentCost: 15000, alternative: 'Local brands + bulk buying', alternativeCost: 11000, savings: 4000, features: 'Same quality, better prices' } ]; const savingsGoals = [ { name: 'Emergency Fund', target: 600000, // ₹6L current: 420000, // ₹4.2L monthlyContribution: 35000, timeToGoal: 5, // months progress: 70 }, { name: 'Goa Vacation', target: 150000, // ₹1.5L current: 85000, // ₹85K monthlyContribution: 15000, timeToGoal: 4, // months progress: 57 }, { name: 'Car Down Payment', target: 500000, // ₹5L current: 180000, // ₹1.8L monthlyContribution: 25000, timeToGoal: 13, // months progress: 36 } ]; return (

Personal Savings Booster

Maximize your savings potential with AI-driven cost optimization

{/* Savings Overview */}

Monthly Savings

₹{(savingsOverview.monthlySavings / 1000).toFixed(0)}K

{savingsOverview.savingsRate}% of income

Potential Savings

₹{(savingsOverview.potentialSavings / 1000).toFixed(1)}K

Additional monthly

Yearly Projection

₹{(savingsOverview.yearlyProjection / 100000).toFixed(1)}L

On track

Optimization Score

8.2

Very Good

Opportunities Duplicates Alternatives Goals
{savingOpportunities.map((category, index) => (
{category.icon}
{category.category} Spending ₹{category.currentSpend.toLocaleString()}/month • Save up to ₹{category.potentialSaving.toLocaleString()}
₹{category.potentialSaving.toLocaleString()} potential
{category.opportunities.map((opportunity, oppIndex) => (

{opportunity.item}

Save ₹{opportunity.saving}/month

))}
))}
Duplicate Subscriptions Detected You're paying for similar services multiple times
{duplicateSubscriptions.map((duplicate, index) => (

{duplicate.service}

₹{duplicate.potentialSaving}/month saving

Current subscriptions: {duplicate.subscriptions.join(', ')}

Total cost: ₹{duplicate.monthlyCost}/month

{duplicate.recommendation}

))}
Cost-Saving Alternatives Better options for your current spending
{alternativeServices.map((service, index) => (
Current

{service.current}

₹{service.currentCost}/month

Alternative

{service.alternative}

₹{service.alternativeCost}/month

{service.features}

Save ₹{service.savings}/month

))}
Savings Goals Progress Track your progress towards financial goals
{savingsGoals.map((goal, index) => (

{goal.name}

₹{(goal.current / 1000).toFixed(0)}K of ₹{(goal.target / 1000).toFixed(0)}K

{goal.progress}%

{goal.timeToGoal} months left

Monthly: ₹{(goal.monthlyContribution / 1000).toFixed(0)}K
))}
); }; export default SavingsBooster;