'use client' import { ReactNode } from 'react' import { useTheme } from '@/lib/ThemeContext' export type InfoBoxVariant = 'info' | 'tip' | 'warning' | 'success' | 'error' interface InfoBoxProps { icon?: string title: string children: ReactNode variant?: InfoBoxVariant className?: string collapsible?: boolean defaultExpanded?: boolean } export function InfoBox({ icon, title, children, variant = 'info', className = '', collapsible = false, defaultExpanded = true }: InfoBoxProps) { const { isDark } = useTheme() // Farben basierend auf Variante und Theme const getColors = () => { const variants = { info: { dark: 'bg-blue-500/10 border-blue-500/30 text-blue-100', light: 'bg-blue-50 border-blue-200 text-blue-800', icon: '💡' }, tip: { dark: 'bg-green-500/10 border-green-500/30 text-green-100', light: 'bg-green-50 border-green-200 text-green-800', icon: '✨' }, warning: { dark: 'bg-amber-500/10 border-amber-500/30 text-amber-100', light: 'bg-amber-50 border-amber-200 text-amber-800', icon: '⚠️' }, success: { dark: 'bg-emerald-500/10 border-emerald-500/30 text-emerald-100', light: 'bg-emerald-50 border-emerald-200 text-emerald-800', icon: '✅' }, error: { dark: 'bg-red-500/10 border-red-500/30 text-red-100', light: 'bg-red-50 border-red-200 text-red-800', icon: '❌' } } return variants[variant] } const colors = getColors() const displayIcon = icon || colors.icon return (