import React, { useState } from 'react';
import { Card } from '../../ui/card';
import { Button } from '../../ui/button';
import { useTheme } from '../../../context/ThemeContext';
import { ThemeVariant } from '../../../types';
import {
Moon,
Sun,
Monitor,
Type,
Layout,
Grid,
Palette,
Check,
} from 'lucide-react';
import { useToast } from '../../../context/ToastContext';
import { Switch } from '../../ui/switch';
export const AppearanceSettingsView: React.FC = () => {
const { theme, setTheme } = useTheme();
const { addToast } = useToast();
const [density, setDensity] = useState<'comfortable' | 'compact' | 'cozy'>(
'comfortable',
);
const [fontSize, setFontSize] = useState(16);
const [accentColor, setAccentColor] = useState('cyan');
const [showSidebar, setShowSidebar] = useState(true);
const accents = [
{ id: 'cyan', hex: '#66FCF1' },
{ id: 'magenta', hex: '#8A7EA4' },
{ id: 'lime', hex: '#36E5D1' },
{ id: 'gold', hex: '#E4B314' },
{ id: 'red', hex: '#E63946' },
];
return (
{/* Header */}
INTERFACE
Customize your visual experience.
{/* Theme Selection */}
Theme
{[
{
id: ThemeVariant.NEON,
label: 'Neon Dark',
icon:
,
},
{
id: ThemeVariant.LIGHT,
label: 'Light Mode',
icon:
,
},
{
id: ThemeVariant.GAMING,
label: 'High Contrast',
icon:
,
},
].map((opt) => (
setTheme(opt.id)}
className={`
cursor-pointer p-6 rounded-xl border-2 transition-all flex flex-col items-center gap-3 relative
${theme === opt.id ? 'border-kodo-cyan bg-kodo-cyan/5' : 'border-kodo-steel bg-kodo-ink hover:border-gray-500'}
`}
>
{opt.icon}
{opt.label}
{theme === opt.id && (
)}
))}
{/* Display Density */}
Density
{[
{
id: 'comfortable',
label: 'Comfortable',
desc: 'More whitespace for readability',
},
{ id: 'cozy', label: 'Cozy', desc: 'Balanced spacing' },
{ id: 'compact', label: 'Compact', desc: 'Maximum data density' },
].map((opt) => (
setDensity(opt.id as any)}
className={`
flex items-center gap-4 p-3 rounded-lg border cursor-pointer transition-all
${density === opt.id ? 'bg-kodo-magenta/10 border-kodo-magenta' : 'bg-kodo-ink border-kodo-steel hover:bg-white/5'}
`}
>
{density === opt.id && (
)}
))}
Typography
Font Size
{fontSize}px
setFontSize(Number(e.target.value))}
className="w-full h-2 bg-kodo-steel rounded-lg appearance-none cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:bg-kodo-gold [&::-webkit-slider-thumb]:rounded-full"
/>
The quick brown fox jumps over the lazy dog.
{/* Colors & Layout */}
Accent Color
{accents.map((col) => (
setAccentColor(col.id)}
className={`w-10 h-10 rounded-full cursor-pointer flex items-center justify-center transition-transform hover:scale-110 ring-2 ring-offset-2 ring-offset-kodo-void ${accentColor === col.id ? 'ring-white' : 'ring-transparent'}`}
style={{ backgroundColor: col.hex }}
>
{accentColor === col.id && (
)}
))}
Layout
setShowSidebar(!showSidebar)}
>
Show Sidebar
Toggle the main navigation sidebar
setShowSidebar(!showSidebar)}
/>
);
};