import { useState } from 'react' import { cn } from '../lib/utils' import { Building2, Bell, Shield, Key, Globe, Save, Loader2, Plus, Copy, Eye, EyeOff, Code2, Trash2 } from 'lucide-react' const tabs = [ { id: 'general', label: 'General', icon: Building2 }, { id: 'notifications', label: 'Notifications', icon: Bell }, { id: 'security', label: 'Security', icon: Shield }, { id: 'api', label: 'API Keys', icon: Key }, { id: 'webhooks', label: 'Webhooks', icon: Globe }, ] export default function Settings() { const [activeTab, setActiveTab] = useState('general') const [saving, setSaving] = useState(false) const [showToken, setShowToken] = useState(false) const handleSave = async () => { setSaving(true); await new Promise(r => setTimeout(r, 800)); setSaving(false) } return (

Settings

Workspace configuration

{tabs.map(tab => { const Icon = tab.icon; return ( )})}
{activeTab === 'general' && (

Workspace Details

)} {activeTab === 'notifications' && (

Notification Preferences

{[{ l: 'New ticket', d: 'When a ticket is created' },{ l: 'Status change', d: 'When ticket status updates' },{ l: 'Comments', d: 'When someone comments' },{ l: 'Assignment', d: 'When assigned to you' }].map(item => (

{item.l}

{item.d}

)} {activeTab === 'security' && (

Security

Two-Factor Authentication

Require 2FA for all members

)} {activeTab === 'api' && (

API Keys

Production Key

{showToken ? 'th_live_sk_a1b2c3...' : 'th_live_sk_••••••...'}
Active

Quick Start

{`curl -X POST https://tickethub.startdata.com.br/api/tickets \\
  -H "Authorization: Bearer YOUR_KEY" \\
  -d '{"title": "New bug"}'`}
)} {activeTab === 'webhooks' && (

Webhooks

No webhooks configured

)}
) }