import React from 'react';
import { DocumentTypeElement } from '../../types/elements';
import { NumericPropertyInput } from '../ui/NumericPropertyInput';
import { ColorPropertyInput } from '../ui/ColorPropertyInput';
import { getPdfBuilderData } from '../../utils/editorFeatures';
type DocumentTypeOption = {
value: string;
label: string;
};
// Composant Accordion personnalisé
const Accordion = ({ title, children, defaultOpen = false }: {
title: string;
children: React.ReactNode;
defaultOpen?: boolean;
}) => {
const [isOpen, setIsOpen] = React.useState(defaultOpen);
return (
{/* Onglets */}
{/* Contenu des onglets */}
{documentCurrentTab === 'fonctionnalites' && (
<>
onChange(element.id, 'showBackground', checked)}
label="Afficher le fond"
description="Affiche un fond coloré derrière le texte"
/>
>
)}
{documentCurrentTab === 'personnalisation' && (
<>
onChange(element.id, 'fontSize', value)}
/>
onChange(element.id, 'textColor', value)}
/>
{/* Section Couleur de fond - visible seulement si showBackground est activé */}
{element.showBackground !== false && (
onChange(element.id, 'backgroundColor', value)}
/>
)}
>
)}
{documentCurrentTab === 'positionnement' && (
<>
onChange(element.id, 'x', value)}
/>
onChange(element.id, 'y', value)}
/>
onChange(element.id, 'width', value)}
/>
onChange(element.id, 'height', value)}
/>
onChange(element.id, 'padding', value)}
/>
>
)}
);
}