# Copyright (c) 2025 Patrick Motsch
# Input/Human node definitions - nodes that require user action.

INPUT_NODES = [
    {
        "id": "input.form",
        "category": "input",
        "label": {"en": "Form", "de": "Formular", "fr": "Formulaire"},
        "description": {"en": "User fills out a form", "de": "Benutzer füllt ein Formular aus", "fr": "L'utilisateur remplit un formulaire"},
        "parameters": [
            {
                "name": "fields",
                "type": "json",
                "required": True,
                "description": {"en": "Form fields: [{name, type, label, required, options?}]", "de": "Formularfelder", "fr": "Champs du formulaire"},
                "default": [],
            },
        ],
        "inputs": 1,
        "outputs": 1,
        "executor": "input",
        "meta": {"icon": "mdi-form-textbox", "color": "#9C27B0"},
    },
    {
        "id": "input.approval",
        "category": "input",
        "label": {"en": "Approval", "de": "Genehmigung", "fr": "Approbation"},
        "description": {"en": "User approves or rejects", "de": "Benutzer genehmigt oder lehnt ab", "fr": "L'utilisateur approuve ou rejette"},
        "parameters": [
            {"name": "title", "type": "string", "required": True, "description": {"en": "Approval title", "de": "Genehmigungstitel", "fr": "Titre"}},
            {"name": "description", "type": "string", "required": False, "description": {"en": "What to approve", "de": "Was genehmigt werden soll", "fr": "Ce qu'il faut approuver"}},
            {"name": "approvalType", "type": "string", "required": False, "description": {"en": "Type: document or generic", "de": "Typ: document oder generic", "fr": "Type: document ou generic"}, "default": "generic"},
        ],
        "inputs": 1,
        "outputs": 1,
        "executor": "input",
        "meta": {"icon": "mdi-check-decagram", "color": "#4CAF50"},
    },
    {
        "id": "input.upload",
        "category": "input",
        "label": {"en": "Upload", "de": "Upload", "fr": "Téléversement"},
        "description": {"en": "User uploads file(s)", "de": "Benutzer lädt Datei(en) hoch", "fr": "L'utilisateur téléverse des fichiers"},
        "parameters": [
            {"name": "accept", "type": "string", "required": False, "description": {"en": "MIME types (e.g. .pdf,image/*)", "de": "MIME-Typen", "fr": "Types MIME"}, "default": ""},
            {"name": "maxSize", "type": "number", "required": False, "description": {"en": "Max file size in MB", "de": "Max. Dateigröße in MB", "fr": "Taille max en Mo"}, "default": 10},
            {"name": "multiple", "type": "boolean", "required": False, "description": {"en": "Allow multiple files", "de": "Mehrere Dateien erlauben", "fr": "Autoriser plusieurs fichiers"}, "default": False},
        ],
        "inputs": 1,
        "outputs": 1,
        "executor": "input",
        "meta": {"icon": "mdi-upload", "color": "#2196F3"},
    },
    {
        "id": "input.comment",
        "category": "input",
        "label": {"en": "Comment", "de": "Kommentar", "fr": "Commentaire"},
        "description": {"en": "User adds a comment", "de": "Benutzer fügt einen Kommentar hinzu", "fr": "L'utilisateur ajoute un commentaire"},
        "parameters": [
            {"name": "placeholder", "type": "string", "required": False, "description": {"en": "Placeholder text", "de": "Platzhalter", "fr": "Texte indicatif"}, "default": ""},
            {"name": "required", "type": "boolean", "required": False, "description": {"en": "Comment required", "de": "Kommentar erforderlich", "fr": "Commentaire requis"}, "default": True},
        ],
        "inputs": 1,
        "outputs": 1,
        "executor": "input",
        "meta": {"icon": "mdi-comment-text", "color": "#FF9800"},
    },
    {
        "id": "input.review",
        "category": "input",
        "label": {"en": "Review", "de": "Prüfung", "fr": "Revue"},
        "description": {"en": "User reviews content", "de": "Benutzer prüft Inhalt", "fr": "L'utilisateur révise le contenu"},
        "parameters": [
            {"name": "contentRef", "type": "string", "required": True, "description": {"en": "Reference to content (e.g. {{nodeId.field}})", "de": "Referenz auf Inhalt", "fr": "Référence au contenu"}},
            {"name": "reviewType", "type": "string", "required": False, "description": {"en": "Type of review", "de": "Art der Prüfung", "fr": "Type de revue"}, "default": "generic"},
        ],
        "inputs": 1,
        "outputs": 1,
        "executor": "input",
        "meta": {"icon": "mdi-magnify-scan", "color": "#673AB7"},
    },
    {
        "id": "input.selection",
        "category": "input",
        "label": {"en": "Selection", "de": "Auswahl", "fr": "Sélection"},
        "description": {"en": "User selects from options", "de": "Benutzer wählt aus Optionen", "fr": "L'utilisateur choisit parmi les options"},
        "parameters": [
            {
                "name": "options",
                "type": "json",
                "required": True,
                "description": {"en": "Options: [{value, label}]", "de": "Optionen", "fr": "Options"},
                "default": [],
            },
            {"name": "multiple", "type": "boolean", "required": False, "description": {"en": "Allow multiple selection", "de": "Mehrfachauswahl erlauben", "fr": "Sélection multiple"}, "default": False},
        ],
        "inputs": 1,
        "outputs": 1,
        "executor": "input",
        "meta": {"icon": "mdi-format-list-checks", "color": "#009688"},
    },
    {
        "id": "input.confirmation",
        "category": "input",
        "label": {"en": "Confirmation", "de": "Bestätigung", "fr": "Confirmation"},
        "description": {"en": "User confirms yes/no", "de": "Benutzer bestätigt Ja/Nein", "fr": "L'utilisateur confirme oui/non"},
        "parameters": [
            {"name": "question", "type": "string", "required": True, "description": {"en": "Question to confirm", "de": "Zu bestätigende Frage", "fr": "Question à confirmer"}},
            {"name": "confirmLabel", "type": "string", "required": False, "description": {"en": "Label for confirm button", "de": "Label für Bestätigen-Button", "fr": "Libellé du bouton confirmer"}, "default": "Confirm"},
            {"name": "rejectLabel", "type": "string", "required": False, "description": {"en": "Label for reject button", "de": "Label für Ablehnen-Button", "fr": "Libellé du bouton refuser"}, "default": "Reject"},
        ],
        "inputs": 1,
        "outputs": 1,
        "executor": "input",
        "meta": {"icon": "mdi-checkbox-marked-circle", "color": "#8BC34A"},
    },
]
