/** * Email Customizer Sidebar * Contains all customization sections */ import { ScrollArea } from '@/components/ui/scroll-area'; import { Button } from '@/components/ui/button'; import { RotateCcw } from 'lucide-react'; import { ContentSection, BrandingSection, ColorsSection, TypographySection, LayoutSection, SenderSection, FooterSection, TableSection, ProductDisplaySection, PlaceholdersSection, CouponDisplaySection, } from './sections'; import type { EmailCustomizerSettings } from './types'; import type { EmailContentSettings, PlaceholderConfig, PlaceholderCategoryLabel, ProductCardConfig, CouponDisplayConfig } from './sections'; interface CustomizerSidebarProps { settings: EmailCustomizerSettings; emailContent: EmailContentSettings; emailTypeLabel: string; onUpdateContent: (updates: Partial) => void; onUpdateLogo: (updates: Partial) => void; onUpdateColors: (updates: Partial) => void; onUpdateTypography: (updates: Partial) => void; onUpdateLayout: (updates: Partial) => void; onUpdateFooter: (updates: Partial) => void; onUpdateSender: (updates: Partial) => void; onUpdateTable: (updates: Partial) => void; onResetToDefaults: () => void; /** Optional hint shown under the subject field. */ subjectPlaceholderHint?: string; /** Feature-specific placeholders. */ placeholders?: PlaceholderConfig[]; /** Feature-specific category label map. */ placeholderCategories?: Record; /** Optional product card config (for product-oriented emails). */ productCard?: ProductCardConfig; /** Callback when product card settings change. */ onUpdateProductCard?: (updates: Partial) => void; /** Optional coupon display config (for emails with coupons). */ couponDisplay?: CouponDisplayConfig; /** Callback when coupon display settings change. */ onUpdateCouponDisplay?: (updates: Partial) => void; } export function CustomizerSidebar({ settings, emailContent, emailTypeLabel, onUpdateContent, onUpdateLogo, onUpdateColors, onUpdateTypography, onUpdateLayout, onUpdateFooter, onUpdateSender, onUpdateTable, onResetToDefaults, subjectPlaceholderHint, placeholders, placeholderCategories, productCard, onUpdateProductCard, couponDisplay, onUpdateCouponDisplay, }: CustomizerSidebarProps) { return (
{/* Header */}

Customize Email

{/* Scrollable Sections */} {productCard && onUpdateProductCard && ( )} {couponDisplay && onUpdateCouponDisplay && ( )}
); } export default CustomizerSidebar;