import React, { useState, useEffect } from 'react'; import { Save, Moon, Sun, Bot, Award, Sparkles } from 'lucide-react'; import { useCustomConfig } from './hooks/useCustomConfig'; import { Card } from '../../components/ui/Card'; import { Button } from '../../components/ui/Button'; import { useTranslation } from 'react-i18next'; import { CardSkeleton } from '../../components/ui/Skeleton'; const CustomConfigPage: React.FC = () => { const { t } = useTranslation(); const { config: serverConfig, isLoading, saveConfig, isSaving } = useCustomConfig(); const [localConfig, setLocalConfig] = useState(null); useEffect(() => { if (serverConfig) setLocalConfig(serverConfig); }, [serverConfig]); // Appliquer le thème visuel dynamiquement pour l'aperçu useEffect(() => { if (localConfig?.visual_theme) { const themes = ['theme-naruto', 'theme-manga-classic']; document.documentElement.classList.remove(...themes); if (localConfig.visual_theme !== 'default') { document.documentElement.classList.add(`theme-${localConfig.visual_theme}`); } } }, [localConfig?.visual_theme]); if (isLoading || !localConfig) return (
); return (

CUSTOM CONFIG

{/* Section Thème Visuel */}

Univers Visuel

{[ { id: 'default', label: 'Standard', color: 'bg-blue-500' }, { id: 'naruto', label: 'Naruto (Orange)', color: 'bg-orange-500' }, { id: 'manga-classic', label: 'Manga (N&B)', color: 'bg-black' } ].map((theme) => ( ))}
{/* Section Apparence */}

Niveau de Défi

{['easy', 'normal', 'hard'].map((d) => ( ))}
{/* Section Apparence */}

Interface

{/* Section IA */}

Personnalité de l'IA

); }; export default CustomConfigPage;