# Copyright (c) 2025 Patrick Motsch
# AI node definitions - map to methodAi actions.

AI_NODES = [
    {
        "id": "ai.prompt",
        "category": "ai",
        "label": {"en": "Prompt", "de": "Prompt", "fr": "Invite"},
        "description": {"en": "Enter a prompt and AI does something", "de": "Prompt eingeben und KI führt aus", "fr": "Entrer une invite et l'IA exécute"},
        "parameters": [
            {"name": "prompt", "type": "string", "required": True, "description": {"en": "AI prompt", "de": "KI-Prompt", "fr": "Invite IA"}},
            {"name": "resultType", "type": "string", "required": False, "description": {"en": "Output format (txt, json, md, etc.)", "de": "Ausgabeformat", "fr": "Format de sortie"}, "default": "txt"},
        ],
        "inputs": 1,
        "outputs": 1,
        "meta": {"icon": "mdi-robot", "color": "#9C27B0"},
        "_method": "ai",
        "_action": "process",
        "_paramMap": {"prompt": "aiPrompt"},
    },
    {
        "id": "ai.webResearch",
        "category": "ai",
        "label": {"en": "Web Research", "de": "Web-Recherche", "fr": "Recherche web"},
        "description": {"en": "Research on the web", "de": "Recherche im Web", "fr": "Recherche sur le web"},
        "parameters": [
            {"name": "query", "type": "string", "required": True, "description": {"en": "Research query", "de": "Recherche-Anfrage", "fr": "Requête de recherche"}},
        ],
        "inputs": 1,
        "outputs": 1,
        "meta": {"icon": "mdi-magnify", "color": "#9C27B0"},
        "_method": "ai",
        "_action": "webResearch",
        "_paramMap": {"query": "prompt"},
    },
    {
        "id": "ai.summarizeDocument",
        "category": "ai",
        "label": {"en": "Summarize Document", "de": "Dokument zusammenfassen", "fr": "Résumer document"},
        "description": {"en": "Summarize document content", "de": "Dokumentinhalt zusammenfassen", "fr": "Résumer le contenu du document"},
        "parameters": [
            {"name": "summaryLength", "type": "string", "required": False, "description": {"en": "Short, medium, or long", "de": "Kurz, mittel oder lang", "fr": "Court, moyen ou long"}, "default": "medium"},
        ],
        "inputs": 1,
        "outputs": 1,
        "meta": {"icon": "mdi-file-document-outline", "color": "#9C27B0"},
        "_method": "ai",
        "_action": "summarizeDocument",
        "_paramMap": {},
    },
    {
        "id": "ai.translateDocument",
        "category": "ai",
        "label": {"en": "Translate Document", "de": "Dokument übersetzen", "fr": "Traduire document"},
        "description": {"en": "Translate document to target language", "de": "Dokument in Zielsprache übersetzen", "fr": "Traduire le document"},
        "parameters": [
            {"name": "targetLanguage", "type": "string", "required": True, "description": {"en": "Target language (e.g. en, de, fr)", "de": "Zielsprache", "fr": "Langue cible"}},
        ],
        "inputs": 1,
        "outputs": 1,
        "meta": {"icon": "mdi-translate", "color": "#9C27B0"},
        "_method": "ai",
        "_action": "translateDocument",
        "_paramMap": {"targetLanguage": "targetLanguage"},
    },
    {
        "id": "ai.convertDocument",
        "category": "ai",
        "label": {"en": "Convert Document", "de": "Dokument konvertieren", "fr": "Convertir document"},
        "description": {"en": "Convert document to another format", "de": "Dokument in anderes Format konvertieren", "fr": "Convertir le document"},
        "parameters": [
            {"name": "targetFormat", "type": "string", "required": True, "description": {"en": "Target format (pdf, docx, txt, etc.)", "de": "Zielformat", "fr": "Format cible"}},
        ],
        "inputs": 1,
        "outputs": 1,
        "meta": {"icon": "mdi-file-convert", "color": "#9C27B0"},
        "_method": "ai",
        "_action": "convertDocument",
        "_paramMap": {"targetFormat": "targetFormat"},
    },
    {
        "id": "ai.generateDocument",
        "category": "ai",
        "label": {"en": "Generate Document", "de": "Dokument generieren", "fr": "Générer document"},
        "description": {"en": "Generate document from prompt", "de": "Dokument aus Prompt generieren", "fr": "Générer un document"},
        "parameters": [
            {"name": "prompt", "type": "string", "required": True, "description": {"en": "Generation prompt", "de": "Generierungs-Prompt", "fr": "Invite de génération"}},
            {"name": "format", "type": "string", "required": False, "description": {"en": "Output format", "de": "Ausgabeformat", "fr": "Format de sortie"}, "default": "docx"},
        ],
        "inputs": 1,
        "outputs": 1,
        "meta": {"icon": "mdi-file-plus", "color": "#9C27B0"},
        "_method": "ai",
        "_action": "generateDocument",
        "_paramMap": {"prompt": "prompt", "format": "format"},
    },
    {
        "id": "ai.generateCode",
        "category": "ai",
        "label": {"en": "Generate Code", "de": "Code generieren", "fr": "Générer code"},
        "description": {"en": "Generate code from description", "de": "Code aus Beschreibung generieren", "fr": "Générer du code"},
        "parameters": [
            {"name": "prompt", "type": "string", "required": True, "description": {"en": "Code generation prompt", "de": "Code-Generierungs-Prompt", "fr": "Invite de génération de code"}},
            {"name": "language", "type": "string", "required": False, "description": {"en": "Programming language", "de": "Programmiersprache", "fr": "Langage de programmation"}, "default": "python"},
        ],
        "inputs": 1,
        "outputs": 1,
        "meta": {"icon": "mdi-code-tags", "color": "#9C27B0"},
        "_method": "ai",
        "_action": "generateCode",
        "_paramMap": {"prompt": "prompt", "language": "language"},
    },
]
