
import { isWindows, isWeb } from '../../../../base/common/platform.js';
import { localize } from '../../../../nls.js';

const COMMONLY_USED_SETTINGS = [
    "editor.fontSize",
    "editor.formatOnSave",
    "files.autoSave",
    "GitHub.copilot-chat.manageExtension",
    "editor.defaultFormatter",
    "editor.fontFamily",
    "editor.wordWrap",
    "chat.agent.maxRequests",
    "files.exclude",
    "workbench.colorTheme",
    "editor.tabSize",
    "editor.mouseWheelZoom",
    "editor.formatOnPaste"
];
function getCommonlyUsedData(settingGroups) {
    const allSettings = ( new Map());
    for (const group of settingGroups) {
        for (const section of group.sections) {
            for (const s of section.settings) {
                allSettings.set(s.key, s);
            }
        }
    }
    const settings = [];
    for (const id of COMMONLY_USED_SETTINGS) {
        const setting = allSettings.get(id);
        if (setting) {
            settings.push(setting);
        }
    }
    return {
        id: "commonlyUsed",
        label: ( localize(11719, "Commonly Used")),
        settings
    };
}
const tocData = {
    id: "root",
    label: "root",
    children: [{
        id: "editor",
        label: ( localize(11720, "Text Editor")),
        settings: ["editor.*"],
        children: [{
            id: "editor/cursor",
            label: ( localize(11721, "Cursor")),
            settings: ["editor.cursor*"]
        }, {
            id: "editor/find",
            label: ( localize(11722, "Find")),
            settings: ["editor.find.*"]
        }, {
            id: "editor/font",
            label: ( localize(11723, "Font")),
            settings: ["editor.font*"]
        }, {
            id: "editor/format",
            label: ( localize(11724, "Formatting")),
            settings: ["editor.format*"]
        }, {
            id: "editor/diffEditor",
            label: ( localize(11725, "Diff Editor")),
            settings: ["diffEditor.*"]
        }, {
            id: "editor/multiDiffEditor",
            label: ( localize(11726, "Multi-File Diff Editor")),
            settings: ["multiDiffEditor.*"]
        }, {
            id: "editor/minimap",
            label: ( localize(11727, "Minimap")),
            settings: ["editor.minimap.*"]
        }, {
            id: "editor/suggestions",
            label: ( localize(11728, "Suggestions")),
            settings: ["editor.*suggest*"]
        }, {
            id: "editor/files",
            label: ( localize(11729, "Files")),
            settings: ["files.*"]
        }]
    }, {
        id: "workbench",
        label: ( localize(11730, "Workbench")),
        settings: ["workbench.*"],
        children: [{
            id: "workbench/appearance",
            label: ( localize(11731, "Appearance")),
            settings: [
                "workbench.activityBar.*",
                "workbench.*color*",
                "workbench.fontAliasing",
                "workbench.iconTheme",
                "workbench.sidebar.location",
                "workbench.*.visible",
                "workbench.tips.enabled",
                "workbench.tree.*",
                "workbench.view.*"
            ]
        }, {
            id: "workbench/breadcrumbs",
            label: ( localize(11732, "Breadcrumbs")),
            settings: ["breadcrumbs.*"]
        }, {
            id: "workbench/editor",
            label: ( localize(11733, "Editor Management")),
            settings: ["workbench.editor.*"]
        }, {
            id: "workbench/settings",
            label: ( localize(11734, "Settings Editor")),
            settings: ["workbench.settings.*"]
        }, {
            id: "workbench/zenmode",
            label: ( localize(11735, "Zen Mode")),
            settings: ["zenmode.*"]
        }, {
            id: "workbench/screencastmode",
            label: ( localize(11736, "Screencast Mode")),
            settings: ["screencastMode.*"]
        }, {
            id: "workbench/browser",
            label: ( localize(11737, "Browser")),
            settings: ["workbench.browser.*"]
        }]
    }, {
        id: "window",
        label: ( localize(11738, "Window")),
        settings: ["window.*"],
        children: [{
            id: "window/newWindow",
            label: ( localize(11739, "New Window")),
            settings: ["window.*newwindow*"]
        }]
    }, {
        id: "chat",
        label: ( localize(11740, "Chat")),
        children: [{
            id: "chat/agent",
            label: ( localize(11741, "Agent")),
            settings: [
                "chat.agent.*",
                "chat.checkpoints.*",
                "chat.editRequests",
                "chat.requestQueuing.*",
                "chat.undoRequests.*",
                "chat.customAgentInSubagent.*",
                "chat.editing.autoAcceptDelay",
                "chat.editing.confirmEditRequest*",
                "chat.planAgent.defaultModel"
            ]
        }, {
            id: "chat/appearance",
            label: ( localize(11742, "Appearance")),
            settings: [
                "chat.editor.*",
                "chat.fontFamily",
                "chat.fontSize",
                "chat.math.*",
                "chat.agentsControl.*",
                "chat.alternativeToolAction.*",
                "chat.codeBlock.*",
                "chat.editing.explainChanges.enabled",
                "chat.editMode.hidden",
                "chat.editorAssociations",
                "chat.extensionUnification.*",
                "chat.inlineReferences.*",
                "chat.notifyWindow*",
                "chat.statusWidget.*",
                "chat.tips.*",
                "chat.unifiedAgentsBar.*",
                "accessibility.signals.chatUserActionRequired",
                "accessibility.signals.chatResponseReceived"
            ]
        }, {
            id: "chat/sessions",
            label: ( localize(11743, "Sessions")),
            settings: [
                "chat.agentSessionProjection.*",
                "chat.sessions.*",
                "chat.viewProgressBadge.*",
                "chat.viewSessions.*",
                "chat.restoreLastPanelSession",
                "chat.exitAfterDelegation",
                "chat.repoInfo.*"
            ]
        }, {
            id: "chat/tools",
            label: ( localize(11744, "Tools")),
            settings: ["chat.tools.*", "chat.extensionTools.*"]
        }, {
            id: "chat/mcp",
            label: ( localize(11745, "MCP")),
            settings: ["mcp", "chat.mcp.*", "mcp.*"]
        }, {
            id: "chat/context",
            label: ( localize(11746, "Context")),
            settings: [
                "chat.detectParticipant.*",
                "chat.experimental.detectParticipant.*",
                "chat.implicitContext.*",
                "chat.promptFilesLocations",
                "chat.instructionsFilesLocations",
                "chat.modeFilesLocations",
                "chat.agentFilesLocations",
                "chat.agentSkillsLocations",
                "chat.hookFilesLocations",
                "chat.promptFilesRecommendations",
                "chat.useAgentsMdFile",
                "chat.useNestedAgentsMdFiles",
                "chat.useAgentSkills",
                "chat.experimental.useSkillAdherencePrompt",
                "chat.useHooks",
                "chat.includeApplyingInstructions",
                "chat.includeReferencedInstructions",
                "chat.sendElementsToChat.*",
                "chat.useClaudeMdFile"
            ]
        }, {
            id: "chat/inlineChat",
            label: ( localize(11747, "Inline Chat")),
            settings: ["inlineChat.*"]
        }, {
            id: "chat/miscellaneous",
            label: ( localize(11748, "Miscellaneous")),
            settings: ["chat.disableAIFeatures", "chat.allowAnonymousAccess"]
        }]
    }, {
        id: "features",
        label: ( localize(11749, "Features")),
        children: [{
            id: "features/accessibilitySignals",
            label: ( localize(11750, "Accessibility Signals")),
            settings: ["accessibility.signal*"]
        }, {
            id: "features/accessibility",
            label: ( localize(11751, "Accessibility")),
            settings: ["accessibility.*"]
        }, {
            id: "features/explorer",
            label: ( localize(11752, "Explorer")),
            settings: ["explorer.*", "outline.*"]
        }, {
            id: "features/search",
            label: ( localize(11753, "Search")),
            settings: ["search.*"]
        }, {
            id: "features/debug",
            label: ( localize(11754, "Debug")),
            settings: ["debug.*", "launch"]
        }, {
            id: "features/testing",
            label: ( localize(11755, "Testing")),
            settings: ["testing.*"]
        }, {
            id: "features/scm",
            label: ( localize(11756, "Source Control")),
            settings: ["scm.*"]
        }, {
            id: "features/extensions",
            label: ( localize(11757, "Extensions")),
            settings: ["extensions.*"]
        }, {
            id: "features/terminal",
            label: ( localize(11758, "Terminal")),
            settings: ["terminal.*"]
        }, {
            id: "features/task",
            label: ( localize(11759, "Task")),
            settings: ["task.*"]
        }, {
            id: "features/problems",
            label: ( localize(11760, "Problems")),
            settings: ["problems.*"]
        }, {
            id: "features/output",
            label: ( localize(11761, "Output")),
            settings: ["output.*"]
        }, {
            id: "features/comments",
            label: ( localize(11762, "Comments")),
            settings: ["comments.*"]
        }, {
            id: "features/remote",
            label: ( localize(11763, "Remote")),
            settings: ["remote.*"]
        }, {
            id: "features/timeline",
            label: ( localize(11764, "Timeline")),
            settings: ["timeline.*"]
        }, {
            id: "features/notebook",
            label: ( localize(11765, "Notebook")),
            settings: ["notebook.*", "interactiveWindow.*"]
        }, {
            id: "features/mergeEditor",
            label: ( localize(11766, "Merge Editor")),
            settings: ["mergeEditor.*"]
        }, {
            id: "features/issueReporter",
            label: ( localize(11767, "Issue Reporter")),
            settings: ["issueReporter.*"],
            hide: !isWeb
        }]
    }, {
        id: "application",
        label: ( localize(11768, "Application")),
        children: [{
            id: "application/http",
            label: ( localize(11769, "Proxy")),
            settings: ["http.*"]
        }, {
            id: "application/keyboard",
            label: ( localize(11770, "Keyboard")),
            settings: ["keyboard.*"]
        }, {
            id: "application/update",
            label: ( localize(11771, "Update")),
            settings: ["update.*"]
        }, {
            id: "application/telemetry",
            label: ( localize(11772, "Telemetry")),
            settings: ["telemetry.*"]
        }, {
            id: "application/settingsSync",
            label: ( localize(11773, "Settings Sync")),
            settings: ["settingsSync.*"]
        }, {
            id: "application/network",
            label: ( localize(11774, "Network")),
            settings: ["network.*"]
        }, {
            id: "application/experimental",
            label: ( localize(11775, "Experimental")),
            settings: ["application.experimental.*"]
        }, {
            id: "application/other",
            label: ( localize(11776, "Other")),
            settings: ["application.*"],
            hide: isWindows
        }]
    }, {
        id: "security",
        label: ( localize(11777, "Security")),
        settings: ["security.*"],
        children: [{
            id: "security/workspace",
            label: ( localize(11778, "Workspace")),
            settings: ["security.workspace.*"]
        }]
    }]
};

export { getCommonlyUsedData, tocData };
