import * as React from 'react'; import { DesignSettings, ThemeName, ButtonStyle, ButtonShape, FontFamily, BackgroundType, BannerType, MediaSource, SideNavSettings, BannerSettings } from '../types'; import { Icon } from './ui/Icon'; import { useTranslation } from '../hooks/useI18n'; interface AccordionProps { title: string; children?: React.ReactNode; defaultOpen?: boolean; } const Accordion: React.FC = ({ title, children, defaultOpen = true }) => { const [isOpen, setIsOpen] = React.useState(defaultOpen); return (
{isOpen &&
{children}
}
); }; const ColorPalettePicker: React.FC<{ label: string; color: string; onChange: (color: string) => void; themeColors?: string[]; }> = ({ label, color, onChange, themeColors = ['#ffffff', '#f3f4f6', '#d1d5db', '#6b7280', '#374151', '#111827', '#10b981', '#3b82f6', '#ef4444'] }) => (
{themeColors.map(c => (
onChange(e.target.value)} className="w-8 h-8 rounded border-none cursor-pointer bg-transparent" />
); const predefinedGradients = [ { name: 'Abyss', value: 'bg-gradient-to-br from-gray-800 to-gray-900' }, { name: 'Emerald', value: 'bg-gradient-to-br from-green-500 to-teal-600' }, { name: 'Sunset', value: 'bg-gradient-to-br from-red-500 to-yellow-500' }, { name: 'Violet', value: 'bg-gradient-to-br from-purple-600 to-indigo-700' }, ]; const predefinedBackgrounds: MediaSource[] = [ { type: 'url', value: 'https://picsum.photos/seed/bg-beach/1200/800' }, { type: 'url', value: 'https://picsum.photos/seed/bg-music/1200/800' }, { type: 'url', value: 'https://picsum.photos/seed/bg-city/1200/800' }, { type: 'url', value: 'https://picsum.photos/seed/bg-dock/1200/800' }, ]; const getImageUrl = (source: MediaSource): string => { if (source.type === 'url') return source.value; if (source.type === 'file') return source.value.previewUrl; return ''; // AIGC not applicable for backgrounds } const themes: { name: string; value: ThemeName }[] = [ { name: 'Light', value: 'light' }, { name: 'Dark', value: 'dark' }, { name: 'Synthwave', value: 'synthwave' }, { name: 'Retro', value: 'retro' }, ]; const fontSizes = [ { name: 'Small', value: 'text-sm' }, { name: 'Base', value: 'text-base' }, { name: 'Large', value: 'text-lg' }, ]; const designTemplates: { name: string, settings: Partial & { sideNavSettings: Partial, bannerSettings: Partial } }[] = [ { name: 'Midnight Emerald', settings: { theme: 'dark', fontColor: '#A7F3D0', backgroundType: 'gradient', backgroundValue: 'bg-gradient-to-br from-emerald-900 via-gray-900 to-black', buttonStyle: 'outline', buttonShape: 'rounded', fontFamily: 'sans', sideNavSettings: { backgroundColor: '#064e3b', textColor: '#a7f3d0', activeLinkColor: '#10b981', hoverBackgroundColor: '#047857', hoverTextColor: '#ffffff', fontFamily: 'sans', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/emerald-city/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Aspen Light', settings: { theme: 'light', fontColor: '#374151', backgroundType: 'color', backgroundValue: '#f9fafb', buttonStyle: 'filled', buttonShape: 'pill', fontFamily: 'sans', sideNavSettings: { backgroundColor: '#ffffff', textColor: '#4b5563', activeLinkColor: '#d1d5db', hoverBackgroundColor: '#f3f4f6', hoverTextColor: '#111827', fontFamily: 'sans', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/aspen/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Sakura Dream', settings: { theme: 'dark', fontColor: '#fbcfe8', backgroundType: 'gradient', backgroundValue: 'bg-gradient-to-br from-gray-900 via-fuchsia-900/50 to-gray-900', buttonStyle: 'outline', buttonShape: 'pill', fontFamily: 'serif', sideNavSettings: { backgroundColor: '#581c87', textColor: '#fbcfe8', activeLinkColor: '#c026d3', hoverBackgroundColor: '#7e22ce', hoverTextColor: '#ffffff', fontFamily: 'serif', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/sakura/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Golden Sands', settings: { theme: 'light', fontColor: '#78350f', backgroundType: 'gradient', backgroundValue: 'bg-gradient-to-br from-amber-100 to-yellow-200', buttonStyle: 'filled', buttonShape: 'rounded', fontFamily: 'serif', sideNavSettings: { backgroundColor: '#fef3c7', textColor: '#92400e', activeLinkColor: '#f59e0b', hoverBackgroundColor: '#fcd34d', hoverTextColor: '#78350f', fontFamily: 'serif', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/sands/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Neo Tokyo', settings: { theme: 'dark', fontColor: '#a5b4fc', backgroundType: 'gradient', backgroundValue: 'bg-gradient-to-br from-black via-indigo-900 to-fuchsia-800', buttonStyle: 'outline', buttonShape: 'square', fontFamily: 'mono', sideNavSettings: { backgroundColor: '#1e1b4b', textColor: '#c7d2fe', activeLinkColor: '#4f46e5', hoverBackgroundColor: '#3730a3', hoverTextColor: '#ffffff', fontFamily: 'mono', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/tokyo-night/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Arctic Dawn', settings: { theme: 'light', fontColor: '#1e3a8a', backgroundType: 'gradient', backgroundValue: 'bg-gradient-to-br from-blue-100 via-white to-blue-50', buttonStyle: 'filled', buttonShape: 'pill', fontFamily: 'sans', sideNavSettings: { backgroundColor: '#eff6ff', textColor: '#1e3a8a', activeLinkColor: '#60a5fa', hoverBackgroundColor: '#dbeafe', hoverTextColor: '#1e293b', fontFamily: 'sans', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/arctic/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Mahogany', settings: { theme: 'dark', fontColor: '#fed7aa', backgroundType: 'color', backgroundValue: '#292524', buttonStyle: 'filled', buttonShape: 'square', fontFamily: 'serif', sideNavSettings: { backgroundColor: '#44403c', textColor: '#fed7aa', activeLinkColor: '#f97316', hoverBackgroundColor: '#9a3412', hoverTextColor: '#ffffff', fontFamily: 'serif', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/mahogany/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Oceanic Deep', settings: { theme: 'dark', fontColor: '#67e8f9', backgroundType: 'gradient', backgroundValue: 'bg-gradient-to-tr from-gray-900 to-teal-900', buttonStyle: 'outline', buttonShape: 'rounded', fontFamily: 'sans', sideNavSettings: { backgroundColor: '#134e4a', textColor: '#99f6e4', activeLinkColor: '#0d9488', hoverBackgroundColor: '#115e59', hoverTextColor: '#ccfbf1', fontFamily: 'sans', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/oceanic/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Scarlet & Slate', settings: { theme: 'dark', fontColor: '#f1f5f9', backgroundType: 'color', backgroundValue: '#1e293b', buttonStyle: 'filled', buttonShape: 'square', fontFamily: 'sans', sideNavSettings: { backgroundColor: '#0f172a', textColor: '#cbd5e1', activeLinkColor: '#dc2626', hoverBackgroundColor: '#475569', hoverTextColor: '#ffffff', fontFamily: 'sans', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/scarlet-slate/1200/300' }, height: 300, width: 'contained' } } }, { name: 'Minimalist White', settings: { theme: 'light', fontColor: '#334155', backgroundType: 'color', backgroundValue: '#ffffff', buttonStyle: 'outline', buttonShape: 'square', fontFamily: 'sans', sideNavSettings: { backgroundColor: '#f1f5f9', textColor: '#475569', activeLinkColor: '#94a3b8', hoverBackgroundColor: '#e2e8f0', hoverTextColor: '#0f172a', fontFamily: 'sans', fontSize: '14px' }, bannerSettings: { type: 'image', value: '', imageSource: { type: 'url', value: 'https://picsum.photos/seed/minimal-white/1200/300' }, height: 300, width: 'contained' } } }, ]; const extendedDesignTemplates: { name: string, settings: Partial & { sideNavSettings: Partial, bannerSettings: Partial } }[] = [ { name: 'Cyberpunk Sunset', settings: { theme: 'dark' as ThemeName, fontColor: '#f472b6', backgroundType: 'gradient' as BackgroundType, backgroundValue: 'bg-gradient-to-br from-indigo-900 via-purple-900 to-pink-900', buttonStyle: 'outline' as ButtonStyle, buttonShape: 'square' as ButtonShape, fontFamily: 'mono' as FontFamily, sideNavSettings: { backgroundColor: '#2b1c58', textColor: '#f472b6', activeLinkColor: '#a855f7', hoverBackgroundColor: '#4c1d95', hoverTextColor: '#f5d0fe', fontFamily: 'mono' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/cyberpunk/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Rustic Charm', settings: { theme: 'light' as ThemeName, fontColor: '#3f3f46', backgroundType: 'color' as BackgroundType, backgroundValue: '#f5f5f4', buttonStyle: 'filled' as ButtonStyle, buttonShape: 'rounded' as ButtonShape, fontFamily: 'serif' as FontFamily, sideNavSettings: { backgroundColor: '#e7e5e4', textColor: '#57534e', activeLinkColor: '#a8a29e', hoverBackgroundColor: '#d6d3d1', hoverTextColor: '#1c1917', fontFamily: 'serif' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/rustic/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Ocean Breeze', settings: { theme: 'light' as ThemeName, fontColor: '#0c4a6e', backgroundType: 'gradient' as BackgroundType, backgroundValue: 'bg-gradient-to-br from-sky-200 to-blue-200', buttonStyle: 'filled' as ButtonStyle, buttonShape: 'pill' as ButtonShape, fontFamily: 'sans' as FontFamily, sideNavSettings: { backgroundColor: '#e0f2fe', textColor: '#075985', activeLinkColor: '#38bdf8', hoverBackgroundColor: '#bae6fd', hoverTextColor: '#0c4a6e', fontFamily: 'sans' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/breeze/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Vintage Noir', settings: { theme: 'dark' as ThemeName, fontColor: '#d6d3d1', backgroundType: 'color' as BackgroundType, backgroundValue: '#1c1917', buttonStyle: 'outline' as ButtonStyle, buttonShape: 'square' as ButtonShape, fontFamily: 'serif' as FontFamily, sideNavSettings: { backgroundColor: '#292524', textColor: '#a8a29e', activeLinkColor: '#facc15', hoverBackgroundColor: '#44403c', hoverTextColor: '#fafafa', fontFamily: 'serif' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/noir/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Jungle Expedition', settings: { theme: 'light' as ThemeName, fontColor: '#1a2e05', backgroundType: 'gradient' as BackgroundType, backgroundValue: 'bg-gradient-to-br from-lime-100 via-green-100 to-lime-200', buttonStyle: 'filled' as ButtonStyle, buttonShape: 'pill' as ButtonShape, fontFamily: 'sans' as FontFamily, sideNavSettings: { backgroundColor: '#dcfce7', textColor: '#166534', activeLinkColor: '#4ade80', hoverBackgroundColor: '#bbf7d0', hoverTextColor: '#14532d', fontFamily: 'sans' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/jungle/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Cosmic Rift', settings: { theme: 'dark' as ThemeName, fontColor: '#e9d5ff', backgroundType: 'gradient' as BackgroundType, backgroundValue: 'bg-[radial-gradient(ellipse_at_bottom,_var(--tw-gradient-stops))] from-gray-700 via-gray-900 to-black', buttonStyle: 'outline' as ButtonStyle, buttonShape: 'pill' as ButtonShape, fontFamily: 'mono' as FontFamily, sideNavSettings: { backgroundColor: '#1e293b', textColor: '#93c5fd', activeLinkColor: '#60a5fa', hoverBackgroundColor: '#334155', hoverTextColor: '#dbeafe', fontFamily: 'mono' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/cosmic/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Autumn Glow', settings: { theme: 'light' as ThemeName, fontColor: '#422006', backgroundType: 'color' as BackgroundType, backgroundValue: '#fff7ed', buttonStyle: 'filled' as ButtonStyle, buttonShape: 'rounded' as ButtonShape, fontFamily: 'serif' as FontFamily, sideNavSettings: { backgroundColor: '#fed7aa', textColor: '#9a3412', activeLinkColor: '#fb923c', hoverBackgroundColor: '#fdba74', hoverTextColor: '#7c2d12', fontFamily: 'serif' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/autumn/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Concrete Jungle', settings: { theme: 'dark' as ThemeName, fontColor: '#e5e7eb', backgroundType: 'color' as BackgroundType, backgroundValue: '#27272a', buttonStyle: 'outline' as ButtonStyle, buttonShape: 'square' as ButtonShape, fontFamily: 'sans' as FontFamily, sideNavSettings: { backgroundColor: '#3f3f46', textColor: '#d4d4d8', activeLinkColor: '#a1a1aa', hoverBackgroundColor: '#52525b', hoverTextColor: '#fafafa', fontFamily: 'sans' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/concrete/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Pastel Playground', settings: { theme: 'light' as ThemeName, fontColor: '#57534e', backgroundType: 'color' as BackgroundType, backgroundValue: '#fdf2f8', buttonStyle: 'filled' as ButtonStyle, buttonShape: 'pill' as ButtonShape, fontFamily: 'sans' as FontFamily, sideNavSettings: { backgroundColor: '#fce7f3', textColor: '#9d174d', activeLinkColor: '#f472b6', hoverBackgroundColor: '#fbcfe8', hoverTextColor: '#831843', fontFamily: 'sans' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/pastel/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, { name: 'Deep Space', settings: { theme: 'dark' as ThemeName, fontColor: '#bfdbfe', backgroundType: 'gradient' as BackgroundType, backgroundValue: 'bg-gradient-to-tl from-gray-900 via-slate-900 to-blue-900', buttonStyle: 'outline' as ButtonStyle, buttonShape: 'rounded' as ButtonShape, fontFamily: 'mono' as FontFamily, sideNavSettings: { backgroundColor: '#0f172a', textColor: '#60a5fa', activeLinkColor: '#3b82f6', hoverBackgroundColor: '#1e293b', hoverTextColor: '#93c5fd', fontFamily: 'mono' as FontFamily, fontSize: '14px' }, bannerSettings: { type: 'image' as BannerType, value: '', imageSource: { type: 'url' as const, value: 'https://picsum.photos/seed/space/1200/300' }, height: 300, width: 'contained' as 'contained' } } }, ].concat(Array.from({ length: 20 }).map((_, i) => ({ name: `Pro Theme ${i + 1}`, settings: { theme: (['dark', 'light'] as const)[i % 2], fontColor: i % 2 === 0 ? '#e0e7ff' : '#1e3a8a', backgroundType: 'gradient' as const, backgroundValue: "bg-gradient-to-br from-slate-800 to-indigo-900", buttonStyle: (['filled', 'outline'] as const)[i % 2], buttonShape: (['rounded', 'pill', 'square'] as const)[i % 3], fontFamily: (['sans', 'serif', 'mono'] as const)[i % 3], sideNavSettings: { backgroundColor: i % 2 === 0 ? '#1e293b' : '#eef2ff', textColor: i % 2 === 0 ? '#94a3b8' : '#312e81', activeLinkColor: i % 2 === 0 ? '#4f46e5' : '#818cf8', hoverBackgroundColor: i % 2 === 0 ? '#334155' : '#c7d2fe', hoverTextColor: i % 2 === 0 ? '#e0e7ff' : '#1e1b4b', fontFamily: (['sans', 'serif', 'mono'] as const)[i % 3], fontSize: '14px', }, bannerSettings: { type: 'image' as const, value: '', imageSource: { type: 'url' as const, value: `https://picsum.photos/seed/pro-theme-${i + 1}/1200/300` }, height: 300, width: 'contained' as const }, } }))); interface DesignEditorProps { design: DesignSettings; setDesign: (newDesign: DesignSettings) => void; } const DesignEditor: React.FC = ({ design, setDesign }) => { const { t } = useTranslation(); const [isThemeModalOpen, setIsThemeModalOpen] = React.useState(false); const updateDesign = (key: keyof DesignSettings, value: any) => { setDesign({ ...design, [key]: value }); }; const updateNested = (parentKey: keyof DesignSettings, childKey: string, value: any) => { updateDesign(parentKey, { ...(design[parentKey] as any), [childKey]: value }); }; const applyThemeTemplate = (templateSettings: any) => { const newSettings = JSON.parse(JSON.stringify(templateSettings)); const fullNewDesign = { ...design, ...newSettings, bannerSettings: { ...design.bannerSettings, ...newSettings.bannerSettings, }, sideNavSettings: { ...design.sideNavSettings, ...newSettings.sideNavSettings, }, }; if (!fullNewDesign.bannerSettings.height) fullNewDesign.bannerSettings.height = 300; if (!fullNewDesign.bannerSettings.width) fullNewDesign.bannerSettings.width = 'contained'; setDesign(fullNewDesign); }; const handleUploadImage = () => { const newImage: MediaSource = { type: 'file', value: { name: `user_upload_${Date.now()}.jpg`, size: 123456, previewUrl: `https://picsum.photos/seed/user-bg-${Date.now()}/400/300` } }; const updatedImages = [...(design.userBackgroundImages || []), newImage]; setDesign({ ...design, userBackgroundImages: updatedImages }); }; return (
{designTemplates.map(template => ( ))}

{t('design_editor.avatar')}

{design.avatarSource?.type === 'url' ? { const newSource: MediaSource = { type: 'url', value: e.target.value }; updateDesign('avatarSource', newSource); }} className="w-full bg-gray-200 dark:bg-gray-700 p-2 rounded-md border border-gray-300 dark:border-gray-600" /> : design.avatarSource?.type === 'file' ?
Simulated Upload: {design.avatarSource.value.name}
:
No avatar set.
}
<>
{themes.map(th => )}
{design.theme === 'custom' && (
updateNested('customThemeColors', 'background', c)} /> updateNested('customThemeColors', 'text', c)} /> updateNested('customThemeColors', 'button', c)} /> updateNested('customThemeColors', 'buttonText', c)} />
)}
updateDesign('fontColor', c)} />

{t('design_editor.button_style')}

{(['filled', 'outline'] as ButtonStyle[]).map(style => )}

{t('design_editor.button_shape')}

{(['rounded', 'pill', 'square'] as ButtonShape[]).map(shape => )}
{(['color', 'gradient', 'image'] as BackgroundType[]).map(type => )}
{design.backgroundType === 'color' && updateDesign('backgroundValue', c)} />} {design.backgroundType === 'gradient' && (
{predefinedGradients.map(bg => )}
)} {design.backgroundType === 'image' && (
{[...predefinedBackgrounds, ...(design.userBackgroundImages || [])].map(bg => { const url = getImageUrl(bg); const isSelected = design.backgroundValue === url; return ( ) })}
)}

{t('design_editor.banner')}

{(['color', 'gradient', 'image', 'none'] as BannerType[]).map(type => )}
{design.bannerSettings.type !== 'none' && ( <>
updateNested('bannerSettings', 'height', parseInt(e.target.value, 10) || 0)} className="w-full bg-gray-200 dark:bg-gray-700 p-2 rounded-md border border-gray-300 dark:border-gray-600"/>
{design.bannerSettings.type === 'color' && updateNested('bannerSettings', 'value', c)} />} {design.bannerSettings.type === 'gradient' && (
{predefinedGradients.map(bg => )}
)} {design.bannerSettings.type === 'image' && (
{design.bannerSettings.imageSource?.type === 'url' ? { const newSource: MediaSource = { type: 'url', value: e.target.value }; updateNested('bannerSettings', 'imageSource', newSource); }} className="w-full bg-gray-200 dark:bg-gray-700 p-2 rounded-md border border-gray-300 dark:border-gray-600" /> : design.bannerSettings.imageSource?.type === 'file' ?
Simulated Upload: {design.bannerSettings.imageSource.value.name}
: null }
)} )}

{t('design_editor.side_nav')}

updateNested('sideNavSettings', 'fontSize', e.target.value)} className="w-full bg-gray-200 dark:bg-gray-700 p-2 rounded-md border border-gray-300 dark:border-gray-600 mt-1" />
{(['normal', 'top', 'center'] as const).map(style => )}
{(['compact', 'full'] as const).map(style => )}
updateNested('sideNavSettings', 'backgroundColor', c)} /> updateNested('sideNavSettings', 'textColor', c)} /> updateNested('sideNavSettings', 'activeLinkColor', c)} /> updateNested('sideNavSettings', 'hoverBackgroundColor', c)} /> updateNested('sideNavSettings', 'hoverTextColor', c)} />

{t('design_editor.chat_widget')}

updateNested('chatWidgetSettings', 'iconColor', c)} /> updateNested('chatWidgetSettings', 'headerBackgroundColor', c)} /> updateNested('chatWidgetSettings', 'headerTextColor', c)} /> updateNested('chatWidgetSettings', 'panelBackgroundColor', c)} /> updateNested('chatWidgetSettings', 'userMessageBackgroundColor', c)} /> updateNested('chatWidgetSettings', 'userMessageTextColor', c)} /> updateNested('chatWidgetSettings', 'aiMessageBackgroundColor', c)} /> updateNested('chatWidgetSettings', 'aiMessageTextColor', c)} />
{isThemeModalOpen && (
setIsThemeModalOpen(false)}>
e.stopPropagation()}>

{t('design_editor.more_themes')}

{extendedDesignTemplates.map(template => ( ))}
)}
); }; export default DesignEditor;