import { useState } from "react"; import { useNavigate } from "react-router-dom"; import { useTheme } from "@context/ThemeContext"; import { useAuth } from "@context/AuthContext"; import { Sun, Moon, Palette, Bell, Lock, Database, ChevronRight, LogOut, User } from "lucide-react"; import toast from "react-hot-toast"; export default function SettingsPage() { const { theme, toggleTheme, isDark, accentColor, setAccentColor } = useTheme(); const { user, logout } = useAuth(); const navigate = useNavigate(); const [notifications, setNotifications] = useState(true); const handleLogout = async () => { try { await logout(); toast.success("Logged out successfully"); navigate("/login"); } catch (error) { toast.error("Logout failed"); } }; const accentColors = [ { name: 'violet', color: 'bg-violet-500', value: 'violet' }, { name: 'blue', color: 'bg-blue-500', value: 'blue' }, { name: 'cyan', color: 'bg-cyan-500', value: 'cyan' }, { name: 'emerald', color: 'bg-emerald-500', value: 'emerald' }, { name: 'amber', color: 'bg-amber-500', value: 'amber' }, { name: 'rose', color: 'bg-rose-500', value: 'rose' }, ]; const cardClasses = `rounded-2xl p-6 border backdrop-blur-lg transition-colors ${ isDark ? 'bg-white/10 border-white/20' : 'bg-white border-gray-200 shadow-sm' }`; const labelClasses = `font-medium ${isDark ? 'text-white' : 'text-gray-900'}`; const subLabelClasses = `text-sm ${isDark ? 'text-white/60' : 'text-gray-500'}`; return (

Settings

Customize your experience

{/* Appearance */}

Appearance

{/* Theme Toggle */}

Theme

Toggle between light and dark mode

{/* Accent Color */}

Accent Color

Choose your preferred accent color

{accentColors.map(({ name, color, value }) => (
{/* Notifications */}

Notifications

Push Notifications

Get notified about worship list updates

{/* Security */}

Security

{/* Data */}

Data

{/* About */}

About

HOP Worship Platform

Version 2.0.0

House of Praise Music Ministry

© 2026 House of Praise. All rights reserved.

{/* Account Section */}

Account

{/* User Info */}

Logged in as

{user?.name || user?.username || 'User'}

{user?.role === 'admin' ? 'Administrator' : 'User'}

{/* Logout Button */}
); }