import React, { useState } from "react"; import { useModalStore } from "../../../stores/modalStore.js"; import { useUserSettingsStore } from "../../../stores/userSettingsStore.js"; export default function SettingsModal() { const { isOpen, type, onClose } = useModalStore(); const { settings, toggleNotification, setTheme } = useUserSettingsStore(); const [activeTab, setActiveTab] = useState("notifications"); if (!isOpen || type !== "settings") return null; const blockedUsers = [ { id: 1, username: "SpamBot", avatar: "🤖", blockedDate: "2 weeks ago" }, ]; const channelSettings = [ { id: "general", name: "general", muted: false, mentions: "all" }, { id: "announcements", name: "announcements", muted: false, mentions: "mentions" }, { id: "random", name: "random", muted: true, mentions: "none" }, ]; const tabs = [ { id: "notifications", label: "🔔 Notifications" }, { id: "privacy", label: "🔒 Privacy" }, { id: "blocked", label: "🚫 Blocked Users" }, { id: "channels", label: "#️⃣ Channel Settings" }, { id: "appearance", label: "🎨 Appearance" }, ]; return (
e.stopPropagation()} style={{ fontFamily: "'Roboto Mono', monospace" }} > {/* Header */}

Settings

{/* Tabs */}
{tabs.map((tab) => ( ))}
{/* Content */}
{activeTab === "notifications" && (
)} {activeTab === "privacy" && (
)} {activeTab === "blocked" && (

You won't receive DMs or see messages from blocked users

{blockedUsers.length === 0 ? (

No blocked users

) : ( blockedUsers.map((user) => (
{user.avatar}

{user.username}

{user.blockedDate}

)) )}
)} {activeTab === "channels" && (

Customize notification settings for individual channels

{channelSettings.map((channel) => (
#{channel.name}
))}
)} {activeTab === "appearance" && (
)}
{/* Footer */}
); }