<?php
// Layout constat — design ConstatSection : titre centré + liste de douleurs
// (texte + description) + illustration avec légende. Exposé au BO (rend le
// composant bespoke via le registry générique, paramétré par ces champs).

defined('ABSPATH') || exit;

$l = 'constat';

return cvb_layout($l, 'Constat (texte + illustration)', [
    cvb_clone_entete($l),
    // Repeater custom : nom UNIQUE préfixé par le tag du layout (anti-collision
    // WPGraphQL-ACF) → type SectionsSectionsConstatConstatPoints.
    cvb_repeater("field_cvb_{$l}_constat_points", 'constat_points', 'Points de douleur', [
        cvb_field("field_cvb_{$l}_constat_points_titre", 'titre', 'Titre', 'text'),
        cvb_field("field_cvb_{$l}_constat_points_description", 'description', 'Description', 'textarea', ['rows' => 2]),
    ], ['max' => 3]),
    cvb_image("field_cvb_{$l}_image", 'image', 'Illustration'),
    cvb_field("field_cvb_{$l}_note", 'note', 'Légende sous l\'illustration', 'text'),
]);
