import { useState, ReactNode } from 'react'; import { BaseElement } from '../../types/elements'; import { NumericPropertyInput } from '../ui/NumericPropertyInput'; import { ColorPropertyInput } from '../ui/ColorPropertyInput'; import { getEditorFeatureFlags } from '../../utils/editorFeatures'; interface ProductTableElement extends BaseElement { showHeaders?: boolean; showBorders?: boolean; showAlternatingRows?: boolean; showShipping?: boolean; showTax?: boolean; showGlobalDiscount?: boolean; columns?: { image?: boolean; name?: boolean; quantity?: boolean; price?: boolean; total?: boolean; [key: string]: boolean | undefined }; globalFontSize?: number; globalFontFamily?: string; globalFontWeight?: string; globalFontStyle?: string; globalFontEnabled?: boolean; headerFontSize?: number; headerFontFamily?: string; headerFontWeight?: string; headerFontStyle?: string; headerTextColor?: string; headerBackgroundColor?: string; rowFontSize?: number; rowFontFamily?: string; rowFontWeight?: string; rowFontStyle?: string; rowTextColor?: string; totalFontSize?: number; totalFontFamily?: string; totalFontWeight?: string; totalFontStyle?: string; totalTextColor?: string; backgroundColor?: string; alternateRowColor?: string; borderColor?: string; textColor?: string; textAlign?: string; verticalAlign?: string; } // Composant Accordion personnalisé const Accordion = ({ title, children, defaultOpen = false }: { title: string; children: ReactNode; defaultOpen?: boolean; }) => { const [isOpen, setIsOpen] = useState(defaultOpen); return (