{
  "className": "clsMeetingMinute",
  "displayName": "Procès-verbal de réunion",
  "description": "Formulaire de création et modification d'un procès-verbal de réunion",
  "properties": [
    {
      "name": "Title",
      "type": "string",
      "label": "Titre de la réunion",
      "required": true,
      "maxLength": 200,
      "ui": {
        "inputType": "text",
        "placeholder": "Entrez le titre de la réunion",
        "width": "100%",
        "helpText": "Titre descriptif de la réunion"
      },
      "validation": {
        "minLength": 3,
        "pattern": "^[^<>\"']*$",
        "custom": "validateTitle"
      }
    },
    {
      "name": "Location",
      "type": "string",
      "label": "Lieu",
      "required": false,
      "maxLength": 100,
      "ui": {
        "inputType": "text",
        "placeholder": "Salle de réunion, adresse...",
        "width": "100%"
      }
    },
    {
      "name": "MeetingDateTime",
      "type": "datetime",
      "label": "Date et heure",
      "required": true,
      "ui": {
        "inputType": "datetime-local",
        "width": "100%"
      },
      "validation": {
        "minDate": "today",
        "custom": "validateDateTime"
      }
    },
    {
      "name": "Duration",
      "type": "number",
      "label": "Durée estimée (minutes)",
      "required": false,
      "min": 15,
      "max": 480,
      "ui": {
        "inputType": "number",
        "placeholder": "30",
        "width": "150px"
      }
    },
    {
      "name": "Attendees",
      "type": "array",
      "label": "Participants",
      "required": true,
      "minItems": 1,
      "itemType": "Person",
      "ui": {
        "component": "PersonSelector",
        "multiple": true,
        "searchable": true,
        "width": "100%"
      },
      "validation": {
        "custom": "validateAttendees"
      }
    },
    {
      "name": "Presenters",
      "type": "array",
      "label": "Présentateurs",
      "required": false,
      "itemType": "Person",
      "ui": {
        "component": "PersonSelector",
        "multiple": true,
        "searchable": true,
        "width": "100%"
      }
    },
    {
      "name": "Tags",
      "type": "array",
      "label": "Mots-clés",
      "required": false,
      "itemType": "Tag",
      "ui": {
        "component": "TagSelector",
        "multiple": true,
        "creatable": true,
        "width": "100%"
      }
    },
    {
      "name": "Topics",
      "type": "array",
      "label": "Sujets de la réunion",
      "required": false,
      "itemType": "Topic",
      "ui": {
        "component": "TopicList",
        "editable": true,
        "addable": true,
        "deletable": true,
        "width": "100%"
      }
    },
    {
      "name": "Notes",
      "type": "string",
      "label": "Notes générales",
      "required": false,
      "maxLength": 2000,
      "ui": {
        "inputType": "textarea",
        "placeholder": "Notes, observations, commentaires...",
        "rows": 4,
        "width": "100%"
      }
    },
    {
      "name": "Status",
      "type": "enum",
      "label": "Statut",
      "required": true,
      "default": "draft",
      "options": [
        { "value": "draft", "label": "Brouillon", "color": "gray" },
        { "value": "in_progress", "label": "En cours", "color": "blue" },
        { "value": "completed", "label": "Terminé", "color": "green" },
        { "value": "cancelled", "label": "Annulé", "color": "red" }
      ],
      "ui": {
        "inputType": "select",
        "width": "200px"
      }
    },
    {
      "name": "Priority",
      "type": "enum",
      "label": "Priorité",
      "required": false,
      "default": "medium",
      "options": [
        { "value": "low", "label": "Basse", "color": "green" },
        { "value": "medium", "label": "Moyenne", "color": "orange" },
        { "value": "high", "label": "Haute", "color": "red" },
        { "value": "urgent", "label": "Urgente", "color": "darkred" }
      ],
      "ui": {
        "inputType": "select",
        "width": "150px"
      }
    }
  ],
  "ui": {
    "layout": "vertical",
    "theme": "modern",
    "responsive": true,
    "sections": [
      {
        "title": "Informations générales",
        "description": "Détails de base de la réunion",
        "properties": ["Title", "Location", "MeetingDateTime", "Duration"],
        "collapsible": false
      },
      {
        "title": "Participants et organisation",
        "description": "Personnes impliquées dans la réunion",
        "properties": ["Attendees", "Presenters"],
        "collapsible": true,
        "defaultCollapsed": false
      },
      {
        "title": "Contenu et sujets",
        "description": "Ordre du jour et sujets traités",
        "properties": ["Topics", "Tags"],
        "collapsible": true,
        "defaultCollapsed": false
      },
      {
        "title": "Métadonnées",
        "description": "Informations de suivi et de gestion",
        "properties": ["Status", "Priority", "Notes"],
        "collapsible": true,
        "defaultCollapsed": true
      }
    ],
    "actions": [
      {
        "name": "save",
        "label": "Sauvegarder",
        "type": "primary",
        "icon": "save",
        "shortcut": "Ctrl+S"
      },
      {
        "name": "saveAsDraft",
        "label": "Sauvegarder brouillon",
        "type": "secondary",
        "icon": "draft"
      },
      {
        "name": "reset",
        "label": "Réinitialiser",
        "type": "secondary",
        "icon": "reset"
      },
      {
        "name": "export",
        "label": "Exporter",
        "type": "secondary",
        "icon": "export",
        "submenu": [
          { "name": "pdf", "label": "PDF", "icon": "pdf" },
          { "name": "xwiki", "label": "XWiki", "icon": "xwiki" },
          { "name": "json", "label": "JSON", "icon": "json" }
        ]
      }
    ],
    "validation": {
      "mode": "realtime",
      "showErrors": true,
      "highlightInvalid": true
    },
    "autoSave": {
      "enabled": true,
      "interval": 30000,
      "showNotification": true
    }
  },
  "businessRules": [
    {
      "name": "attendeesRequired",
      "description": "Une réunion doit avoir au moins un participant",
      "condition": "Attendees.length > 0",
      "message": "Au moins un participant est requis",
      "severity": "error"
    },
    {
      "name": "dateInFuture",
      "description": "La date de réunion doit être dans le futur",
      "condition": "MeetingDateTime > new Date()",
      "message": "La date de réunion doit être dans le futur",
      "severity": "warning"
    },
    {
      "name": "topicsWithDuration",
      "description": "Les sujets doivent avoir une durée estimée",
      "condition": "Topics.every(topic => topic.Duration > 0)",
      "message": "Tous les sujets doivent avoir une durée estimée",
      "severity": "info"
    }
  ]
}
