import { useState, useEffect, useCallback, useMemo } from 'react' import { useTranslation } from 'react-i18next' import { COLOR_PRESETS, ColorPreset } from '../data/colorPresets' import { hexToHsl, hslToHex, isValidHex, HSLColor } from '../utils/colorConversion' import { ThemeColors, DEFAULT_THEME_COLORS } from '../types/theme' import { applyThemeColors } from '../hooks/useThemeColors' interface ThemeBentoPickerProps { currentColors: ThemeColors onColorsChange: (colors: ThemeColors) => void onSave: () => void isSaving: boolean } const CheckIcon = () => ( ) const ChevronDownIcon = () => ( ) const MoonIcon = () => ( ) const SunIcon = () => ( ) const StatusIcon = () => ( ) const PaletteIcon = () => ( ) function PresetCard({ preset, isSelected, onClick, }: { preset: ColorPreset isSelected: boolean onClick: () => void }) { const { i18n } = useTranslation() const isRu = i18n.language === 'ru' return ( ) } function HSLSlider({ label, value, onChange, max, gradient, suffix = '', }: { label: string value: number onChange: (value: number) => void max: number gradient: string suffix?: string }) { return (