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 { Switch } from '@/components/ui/switch'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { Separator } from '@/components/ui/separator'; import { Slider } from '@/components/ui/slider'; import { Settings as SettingsIcon, User, Bell, Shield, Palette, Database, Target, Bot, Download, Upload, Trash2, Eye, EyeOff, Moon, Sun, Globe, Smartphone, Mail, Lock, CreditCard, TrendingUp, AlertTriangle, CheckCircle, IndianRupee } from 'lucide-react'; const Settings: React.FC = () => { const [settings, setSettings] = useState({ // Personal Settings displayName: 'Anjali', email: 'anjali@example.com', phone: '+91 98765 43210', dateOfBirth: '1995-06-15', occupation: 'Software Engineer', // Financial Preferences currency: 'INR', language: 'en', fiscalYearStart: 'april', riskTolerance: 'moderate', investmentHorizon: 'long_term', monthlyIncome: 85000, // Notifications emailNotifications: true, pushNotifications: true, weeklyReports: true, goalReminders: true, billReminders: true, marketAlerts: false, // Privacy & Security biometricAuth: true, twoFactorAuth: false, dataSharing: false, analyticsTracking: true, // AI Assistant aiPersonality: 'friendly', responseDetail: 'detailed', proactiveInsights: true, voiceEnabled: true, // App Preferences theme: 'system', compactMode: false, showTips: true, autoRefresh: true, refreshInterval: 5 }); const handleSettingChange = (key: string, value: any) => { setSettings(prev => ({ ...prev, [key]: value })); }; const currencyOptions = [ { value: 'INR', label: '₹ Indian Rupee', symbol: '₹' }, { value: 'USD', label: '$ US Dollar', symbol: '$' }, { value: 'EUR', label: '€ Euro', symbol: '€' }, { value: 'GBP', label: '£ British Pound', symbol: '£' } ]; const languageOptions = [ { value: 'en', label: 'English' }, { value: 'hi', label: 'हिन्दी (Hindi)' }, { value: 'bn', label: 'বাংলা (Bengali)' }, { value: 'ta', label: 'தமிழ் (Tamil)' } ]; const riskToleranceOptions = [ { value: 'conservative', label: 'Conservative', description: 'Lower risk, stable returns' }, { value: 'moderate', label: 'Moderate', description: 'Balanced risk and returns' }, { value: 'aggressive', label: 'Aggressive', description: 'Higher risk, potential for high returns' } ]; return (

Settings & Preferences

Customize your AI financial companion to match your preferences

Personal Financial Notifications Privacy AI Assistant Advanced
Personal Information
Update your personal details and profile information
handleSettingChange('displayName', e.target.value)} placeholder="Your display name" />
handleSettingChange('email', e.target.value)} placeholder="your@email.com" />
handleSettingChange('phone', e.target.value)} placeholder="+91 12345 67890" />
handleSettingChange('occupation', e.target.value)} placeholder="Your profession" />
handleSettingChange('dateOfBirth', e.target.value)} />
handleSettingChange('monthlyIncome', parseInt(e.target.value))} placeholder="85000" className="pl-10" />
Financial Preferences
Configure your financial settings and investment preferences
{riskToleranceOptions.map((option) => (
handleSettingChange('riskTolerance', option.value)} >

{option.label}

{settings.riskTolerance === option.value && ( )}

{option.description}

))}
Notification Preferences
Choose how and when you want to receive notifications

Receive important updates via email

handleSettingChange('emailNotifications', checked)} />

Get instant alerts on your device

handleSettingChange('pushNotifications', checked)} />

Receive weekly financial summaries

handleSettingChange('weeklyReports', checked)} />

Get reminded about your financial goals

handleSettingChange('goalReminders', checked)} />

Never miss a bill payment

handleSettingChange('billReminders', checked)} />

Receive important market updates

handleSettingChange('marketAlerts', checked)} />
Privacy & Security
Manage your privacy settings and security preferences

Use fingerprint/face ID to unlock the app

handleSettingChange('biometricAuth', checked)} />

Add an extra layer of security

handleSettingChange('twoFactorAuth', checked)} />

Share anonymized data to improve AI recommendations

handleSettingChange('dataSharing', checked)} />

Help us improve the app with usage analytics

handleSettingChange('analyticsTracking', checked)} />

Data Management

AI Assistant Settings
Customize your AI financial companion's behavior and responses

AI will proactively suggest optimizations

handleSettingChange('proactiveInsights', checked)} />

Enable voice interactions with the AI

handleSettingChange('voiceEnabled', checked)} />
Advanced Settings
Configure advanced app behavior and performance settings
handleSettingChange('refreshInterval', value[0])} max={30} min={1} step={1} className="w-full" />
1 min {settings.refreshInterval} min 30 min

Show more information in less space

handleSettingChange('compactMode', checked)} />

Display helpful tips throughout the app

handleSettingChange('showTips', checked)} />

Automatically refresh data in the background

handleSettingChange('autoRefresh', checked)} />

Reset Options

); }; export default Settings;