-- Assistant profile parser data.
-- Literal copy-scope phrases live here so parser logic stays focused on workflow behavior.
local addonName, MSUF = ...
MSUF = MSUF or _G.MSUF_NS or {}

local M = MSUF.MSUF2 or _G.MSUF2 or {}
MSUF.MSUF2 = M

local A = MSUF.Assistant or {}
MSUF.Assistant = A
M.Assistant = A

local Data = A.ParserData or {}
A.ParserData = Data

Data.PROFILE_PARSER = {
    COPY_SCOPE_DEFAULTS = {
        basics = true,
        text = true,
        portrait = true,
        power = true,
        castbar = true,
        status = true,
        load = true,
        transparency = true,
        layout = false,
    },

    UNIT_COPY_SCOPE_SPECS = {
        { key = "layout", aliases = { "layout", "position", "positioning", "placement", "location", "size", "anchoring", "anchor", "width", "height" } },
        { key = "text", aliases = { "text", "name", "hp", "health text", "hp text", "power text", "mana text", "energy text", "resource text", "font", "fonts" } },
        { key = "portrait", aliases = { "portrait", "portrait settings" } },
        { key = "power", aliases = { "power", "mana", "energy", "resource", "power settings", "mana settings", "energy settings", "resource settings", "power bar", "powerbar", "detached power", "detached power bar", "resource bar" } },
        { key = "castbar", aliases = { "castbar", "cast bar" } },
        { key = "status", aliases = { "status icon", "status icons", "status indicator", "status indicators", "indicator", "indicators", "level indicator", "raid marker" } },
        { key = "load", aliases = { "load condition", "load conditions", "hide mounted", "hide out of combat" } },
        { key = "transparency", aliases = { "transparency", "opacity", "alpha", "range fade" } },
        { key = "basics", aliases = { "frame basics", "basic settings", "basics", "enable state", "smooth fill", "reverse fill" } },
    },

    GROUP_COPY_SCOPE_DEFAULTS = {
        general = true,
        health = true,
        text = true,
        font = true,
        border = true,
        range = true,
        indicators = true,
        auras = true,
        highlight = true,
        dstripe = true,
        features = true,
    },

    GROUP_COPY_SCOPE_SPECS = {
        { key = "general", aliases = { "general", "basics", "basic settings", "layout", "position", "positioning", "placement", "size", "width", "height", "spacing", "growth", "sort", "sorting", "columns", "raid groups" } },
        { key = "health", aliases = { "health", "health bars", "bars", "power", "power bar", "power text", "bar texture", "dispel overlay" } },
        { key = "text", aliases = { "text", "name", "health text", "hp text", "text and name" } },
        { key = "font", aliases = { "font", "fonts", "font override", "font color", "font outline" } },
        { key = "border", aliases = { "background", "opacity", "alpha", "transparency", "background opacity" } },
        { key = "range", aliases = { "range", "range fade", "offline alpha" } },
        { key = "indicators", aliases = { "indicators", "status icons", "status icon", "role icon", "leader icon", "assist icon", "raid marker", "ready check", "summon icon" } },
        { key = "auras", aliases = { "auras", "aura", "buffs", "buff", "debuffs", "debuff" } },
        { key = "highlight", aliases = { "highlight", "aggro", "aggro highlight", "dispel border", "purge border" } },
        { key = "dstripe", aliases = { "debuff stripe", "stripe" } },
        { key = "features", aliases = { "corner", "corner indicator", "corner indicators", "corner dots", "spell indicator", "spell indicators", "corner spell" } },
    },

    COPY_SCOPE_NEGATIVE_PREFIXES = {
        "without ",
        "with no ",
        "except ",
        "except for ",
        "excluding ",
        "exclude ",
        "but not ",
        "not ",
        "no ",
        "minus ",
        "skip ",
        "leave out ",
        "ohne ",
        "ohne die ",
        "ohne den ",
        "ausser ",
        "ausser die ",
        "ausser den ",
        "nicht ",
    },

    FULL_COPY_TERMS = {
        "all settings", "all categories", "everything", "complete settings",
        "copy to function", "copy-to function", "copyto function", "copy to workflow",
    },
    FULL_UNIT_COPY_TERMS = { "entire unit", "whole unit" },
    UNIT_PROFILE_COPY_TERMS = { "profile", "profil", "unit profile", "unitframe profile", "unit frame profile", "frame profile" },
    FULL_GROUP_COPY_TERMS = { "entire group", "whole group" },
    GROUP_PROFILE_COPY_TERMS = { "profile", "profil", "group profile", "groupframe profile", "group frame profile", "frame profile" },
    COPY_SCOPE_SIZE_TERMS = { "size", "width", "height" },

    PROFILE_EXPORT_KIND_LABELS = {
        all = "Full profile",
        unitframe = "Unit Frames",
        castbar = "Cast Bars",
        colors = "Colors",
        gameplay = "Gameplay",
        groupframe = "Group Frames",
    },
    PROFILE_EXPORT_COLOR_TERMS = { "colors", "color palette", "color settings", "farben", "farbprofil", "farbeinstellungen" },
    PROFILE_EXPORT_CASTBAR_TERMS = { "castbar", "castbars", "zauberleiste", "zauberleisten" },
    PROFILE_EXPORT_GAMEPLAY_TERMS = { "gameplay", "combat timer", "crosshair", "totem frame", "spielhilfe", "kampftimer", "fadenkreuz", "totemrahmen" },
    PROFILE_EXPORT_GROUPFRAME_TERMS = { "group frame", "group frames", "groupframe", "party", "raid", "mythicraid", "gruppenframes", "gruppen frames", "gruppenrahmen", "gruppe" },
    PROFILE_EXPORT_UNITFRAME_TERMS = { "unitframe", "unitframes", "unit frame", "unit frames", "player", "target", "focus", "boss", "pet", "einheitenfenster", "spieler", "ziel", "fokus" },

    PROFILE_RESTORE_ACTION_TERMS = { "restore", "recover", "rollback", "use backup", "use last backup", "load backup", "load last backup", "switch to backup", "switch to last backup" },
    PROFILE_BACKUP_TERMS = { "backup", "backup profile", "profile backup", "last backup" },
    PROFILE_STRING_TERMS = { "profile string", "export string", "profile export string", "copy profile string" },
    PROFILE_EXPORT_ACTION_TERMS = { "show", "show me", "copy", "export", "share", "give me", "generate" },
    PROFILE_EXPORT_REJECT_TERMS = { "where", "paste", "import", "how", "how do", "how to", "why" },
    PROFILE_READONLY_QUERY_TERMS = {
        "where", "where is", "where are", "find", "search", "show me",
        "help", "hilfe", "explain", "erklaere", "what is", "what are", "what can",
        "how", "how do", "how to", "why", "faq", "broken", "not working", "doesnt work",
        "does not work", "won't work", "wont work", "fails", "failed", "failure", "error", "errors", "stuck",
    },
    PROFILE_EXPORT_TERMS = {
        "export", "exportieren", "share profile", "share current profile", "share active profile",
        "profil exportieren", "aktuelles profil exportieren", "profilexport", "profil string",
        "profilstring", "export string", "exportiere profil", "exportiere aktuelles profil",
        "exportiere aktives profil", "teile profil", "profil teilen",
        "share my profile", "share msuf profile", "share my msuf profile",
        "copy string", "copy profile string", "profile string", "export string", "profile export string",
        "save backup", "save a backup", "save profile backup",
        "backup msuf settings", "backup my msuf settings", "backup settings", "backup my settings",
        "backup current settings", "backup my current settings", "make backup before import",
        "make a backup before import", "backup before import",
        "make backup before importing", "make a backup before importing", "backup before importing",
        "backup before profile import", "backup before importing profile",
        "backup raid profile", "backup party profile", "backup group profile",
        "backup group frame profile", "backup group frames profile",
        "backup raid settings", "backup party settings", "backup group frame settings", "backup group frames settings",
    },
    PROFILE_SIMPLE_BACKUP_TERMS = { "backup profile", "backup current profile", "backup active profile", "profile backup" },
    PROFILE_NAME_CONNECTOR_TERMS = { " as ", " to ", " named ", " called " },

    BACKUP_BEFORE_IMPORT_TERMS = {
        "make backup before import", "make a backup before import", "backup before import",
        "backup vor import", "backup vor profil import", "sicherung vor import",
        "sichere profil vor import", "profil sichern vor import",
        "make backup before importing", "make a backup before importing", "backup before importing",
        "backup before profile import", "backup before importing profile",
        "backup first then import", "backup first and import", "backup then import",
        "make backup then import", "make a backup then import",
        "make backup first then import", "make a backup first then import",
    },
    SAFE_PROFILE_IMPORT_TERMS = {
        "import safely", "import safe", "safe import", "safe profile import",
        "import profile safely", "import profile safe", "profile import safely",
        "import after backup", "import after backing up", "paste safely", "paste this safely",
        "paste profile safely", "paste profile after backup",
        "sicher importieren", "sicherer import", "profil sicher importieren",
        "import nach backup", "nach backup importieren", "erst sichern dann importieren",
        "backup dann importieren", "profil nach sicherung importieren",
    },
    PROFILE_BACKUP_RESTORE_TERMS = {
        "restore backup", "restore my backup", "restore my backup profile",
        "restore backup profile", "restore profile backup",
        "restore last backup", "restore last backup profile",
        "recover backup", "recover my backup", "recover my backup profile",
        "use backup profile", "use my backup profile", "use last backup profile",
        "load backup profile", "load my backup profile", "load last backup profile",
        "switch to backup profile", "switch to last backup profile",
    },

    WORKFLOW_STATUS_TERMS = {
        "workflow status", "assistant workflow status", "pending workflow", "pending flow",
        "active workflow", "what workflow", "what is pending", "assistant current step",
        "current assistant step", "current step", "show current step", "show assistant current step",
        "assistant step status", "step status", "what is the current step",
    },
    WORKFLOW_BACK_TERMS = { "go back", "open previous page", "previous page", "return to previous page", "back to previous page" },
    WORKFLOW_FORWARD_TERMS = {
        "go forward", "open next page", "next page", "forward page", "return forward", "page forward",
        "go to next page", "naechste seite", "seite vorwaerts",
    },
    WORKFLOW_CANCEL_TERMS = { "cancel workflow", "cancel current workflow", "cancel assistant workflow", "stop assistant workflow", "abort workflow" },
    PROFILE_PANEL_CLOSE_TERMS = { "close import", "cancel import", "close export", "close assistant panel", "close profile import", "cancel profile import", "close profile export" },

    PROFILE_WORD_TERMS = { "profile", "profiles", "profil" },
    PROFILE_STAGING_INTENT_TERMS = {
        "field", "input", "text box", "textbox", "staging", "stage", "select", "choose", "set", "fill", "paste into",
        "turn on", "turn off", "enable", "disable",
    },
    PROFILE_EXPORT_KIND_SELECTOR_TERMS = { "export kind", "export type", "export dropdown", "profile export kind", "profile export type" },
    PROFILE_IMPORT_CREATE_NEW_TERMS = { "import and create new profile", "import create new", "new profile import", "new-profile import", "import into new profile", "create new profile import" },
    PROFILE_IMPORT_CURRENT_PROFILE_TERMS = { "off", "disable", "disabled", "current profile", "active profile" },
    PROFILE_IMPORT_NEW_NAME_TERMS = { "new profile name", "new-profile name", "import new profile name", "import profile name" },
    PROFILE_IMPORT_NAME_CONTEXT_TERMS = { "import", "new profile", "new-profile" },
    PROFILE_NAME_VALUE_CONNECTORS = { " to ", " as ", " named ", " called ", " name ", " value " },
    PROFILE_IMPORT_STRING_TERMS = { "profile string", "import string", "profile import string" },
    PROFILE_IMPORT_STRING_FIELD_TERMS = { "field", "input", "text box", "textbox", "stage", "staging", "set", "fill", "paste into" },
    PROFILE_IMPORT_STRING_CONNECTORS = { " to ", " with ", " value ", " text ", " string ", " paste " },
    PROFILE_CREATE_COPY_NAME_TERMS = { "profile name field", "profile name input", "create copy name", "create/copy name", "profile create name", "profile copy name", "profile name for create", "profile name for copy" },

    GROUP_COPY_SCOPE_SELECTOR_TERMS = { "group copy", "group frame copy", "group frames copy", "copy category", "copy categories", "copy scope", "copy scopes" },
    GROUP_COPY_SCOPE_REJECT_TERMS = { "group copy", "group frame copy", "group frames copy", "group copy category", "group copy categories", "group copy scope", "group copy scopes" },
    COPY_SCOPE_KIND_TERMS = { "category", "categories", "scope", "scopes" },
    COPY_SCOPE_ALL_TERMS = { "all categories", "select all", "turn on all", "enable all" },
    COPY_SCOPE_ALL_CONTEXT_TERMS = { "all" },
    COPY_SCOPE_ENABLE_TERMS = { "turn on", "enable", "select" },
    COPY_SCOPE_NONE_TERMS = { "no categories", "none", "select none", "clear categories", "turn off all", "disable all" },
    COPY_SCOPE_CLEAR_TERMS = { "clear", "disable" },
    COPY_SCOPE_ONLY_TERMS = { "only", "only these", "just" },
    COPY_SCOPE_FALSE_TERMS = { "exclude", "without", "remove", "disable" },
    UNIT_COPY_SCOPE_SELECTOR_TERMS = { "unit copy", "unit frame copy", "unit frames copy", "unitframe copy", "unitframes copy", "frame copy" },

    PROFILE_SWITCH_SHORT_TERMS = { "switch to", "wechsel zu" },
    PROFILE_SWITCH_SHORT_PREFIXES = { "switch to ", "wechsel zu " },
    PROFILE_IMPORT_ACTION_TERMS = { "import", "importiere", "paste", "einfuegen", "einfuege" },
    PROFILE_LEGACY_IMPORT_TERMS = { "legacy import", "import legacy", "old profile import", "legacy profile" },
    PROFILE_MAPPING_TERMS = {
        "profile mapping", "profile mappings", "spec profile mapping", "spec profile mappings",
        "broken profile mapping", "broken profile mappings", "broken spec mapping", "broken spec mappings",
    },
    PROFILE_MAPPING_CLEAN_TERMS = { "clear", "fix", "repair", "remove", "clean" },
    WAGO_PROFILE_TERMS = { "wago profile", "wago profiles", "browse wago profiles", "profile hub", "wago profile suchen", "wago profile durchsuchen" },
    PROFILE_RESET_TERMS = { "reset", "zuruecksetzen", "zurucksetzen", "defaults", "factory defaults", "standardwerte", "werkseinstellungen" },
    PROFILE_RESET_PREFIXES = {
        "reset current profile ", "reset active profile ", "reset profile ",
        "zuruecksetzen aktuelles profil ", "aktuelles profil zuruecksetzen ",
        "zurucksetzen aktuelles profil ", "aktuelles profil zurucksetzen ",
        "profil zuruecksetzen ", "profil zurucksetzen ",
    },
    PROFILE_DELETE_TERMS = { "delete", "remove", "loeschen", "entfernen", "profil loeschen", "profil entfernen" },
    PROFILE_DELETE_PREFIXES = { "delete profile ", "delete the profile ", "remove profile ", "remove the profile " },
    PROFILE_SWITCH_TERMS = {
        "switch", "wechsel", "wechsle", "change profile", "use", "use profile", "use the", "use my",
        "activate", "load", "select profile", "aktiviere", "lade", "nutze profil", "verwende profil",
        "waehle profil", "profil wechseln", "profil aktivieren", "profil laden",
    },
    PROFILE_SWITCH_PREFIXES = {
        "switch to profile ",
        "switch profile to ",
        "switch profile ",
        "switch to ",
        "use profile ",
        "use the ",
        "use my ",
        "use ",
        "activate profile ",
        "activate ",
        "load profile ",
        "load ",
        "select profile ",
        "wechsel zu profil ",
        "wechsle zu profil ",
        "wechsel profil zu ",
        "wechsle profil zu ",
        "wechsel zu ",
        "wechsle zu ",
        "nutze profil ",
        "verwende profil ",
        "aktiviere profil ",
        "aktiviere ",
        "lade profil ",
        "lade ",
        "waehle profil ",
    },
    PROFILE_CREATE_TERMS = { "create", "new profile", "erstellen", "erstelle", "anlegen", "neues profil" },
    PROFILE_RENAME_TERMS = { "rename", "umbenennen", "benenne", "benenn", "profile rename" },
    PROFILE_COPY_TERMS = {
        "copy", "duplicate", "clone", "dupe", "backup", "duplizieren",
        "kopiere", "kopieren", "dupliziere", "sichere", "sichern",
        "save current profile", "save active profile", "save my profile",
        "save my current profile", "save my active profile",
    },
    PROFILE_COPY_SOURCE_PREFIXES = {
        "copy from profile ",
        "copy existing profile ",
        "copy source profile ",
        "kopiere von profil ",
        "kopiere vorhandenes profil ",
        "kopiere quellprofil ",
    },
    PROFILE_SUMMARY_TERMS = {
        "list profiles", "show profiles", "profile list", "profile summary",
        "profile status", "current profile", "active profile", "which profile",
        "what profile", "what profile am i using", "which profile am i using",
        "profile am i using", "profile i am using",
        "spec profiles", "specialization profiles",
        "liste profile", "zeige profile", "profil liste", "profil uebersicht",
        "profil status", "aktuelles profil", "aktives profil", "welches profil",
        "welches profil nutze ich", "welches profil verwende ich", "spec profile", "spezialisierungs profile",
    },
    PROFILE_SUMMARY_REJECT_TERMS = {
        "reset", "delete", "remove", "switch", "wechsel", "copy", "duplicate", "clone", "dupe",
        "create", "new profile", "import", "export", "backup", "loeschen", "entfernen",
        "kopiere", "duplizieren", "dupliziere", "erstellen", "erstelle", "neues profil",
    },
    IMPORT_NEW_PROFILE_PROMPT_TERMS = { "new profile", "new-profile", "as new profile", "to new profile", "neues profil", "als neues profil", "in neues profil" },
    SPEC_AUTO_SWITCH_TERMS = {
        "auto switch profile", "auto-switch profile", "profile auto switch",
        "profile by specialization", "profile by spec", "spec profile switching",
        "specialization profile switching",
        "profil auto switch", "profil automatisch wechseln", "profil nach spec",
        "profil nach spezialisierung", "spec profil wechsel", "spezialisierungs profil wechsel",
    },
    SPEC_PROFILE_TERMS = {
        "spec profile", "specialization profile", "profile by spec", "profile by specialization",
        "spec profil", "spezialisierung profil", "profil nach spec", "profil nach spezialisierung",
        "profil fuer spec", "profil fuer spezialisierung",
    },
    SPEC_PROFILE_CLEAR_TERMS = { "clear", "remove", "unset", "loeschen", "entfernen", "aufheben", "zuruecksetzen" },
    SPEC_PROFILE_ASSIGN_TERMS = { "assign", "set", "zuweisen", "setze", "nutze", "verwende" },
}
