
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(12563, "Commonly Used")),
        settings
    };
}
const tocData = {
    id: "root",
    label: "root",
    children: [{
        id: "editor",
        label: ( localize(12564, "Text Editor")),
        settings: ["editor.*"],
        children: [{
            id: "editor/cursor",
            label: ( localize(12565, "Cursor")),
            settings: ["editor.cursor*"]
        }, {
            id: "editor/find",
            label: ( localize(12566, "Find")),
            settings: ["editor.find.*"]
        }, {
            id: "editor/font",
            label: ( localize(12567, "Font")),
            settings: ["editor.font*"]
        }, {
            id: "editor/format",
            label: ( localize(12568, "Formatting")),
            settings: ["editor.format*"]
        }, {
            id: "editor/diffEditor",
            label: ( localize(12569, "Diff Editor")),
            settings: ["diffEditor.*"]
        }, {
            id: "editor/multiDiffEditor",
            label: ( localize(12570, "Multi-File Diff Editor")),
            settings: ["multiDiffEditor.*"]
        }, {
            id: "editor/minimap",
            label: ( localize(12571, "Minimap")),
            settings: ["editor.minimap.*"]
        }, {
            id: "editor/suggestions",
            label: ( localize(12572, "Suggestions")),
            settings: ["editor.*suggest*"]
        }, {
            id: "editor/files",
            label: ( localize(12573, "Files")),
            settings: ["files.*"]
        }]
    }, {
        id: "workbench",
        label: ( localize(12574, "Workbench")),
        settings: ["workbench.*"],
        children: [{
            id: "workbench/appearance",
            label: ( localize(12575, "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(12576, "Breadcrumbs")),
            settings: ["breadcrumbs.*"]
        }, {
            id: "workbench/editor",
            label: ( localize(12577, "Editor Management")),
            settings: ["workbench.editor.*"]
        }, {
            id: "workbench/settings",
            label: ( localize(12578, "Settings Editor")),
            settings: ["workbench.settings.*"]
        }, {
            id: "workbench/zenmode",
            label: ( localize(12579, "Zen Mode")),
            settings: ["zenmode.*"]
        }, {
            id: "workbench/screencastmode",
            label: ( localize(12580, "Screencast Mode")),
            settings: ["screencastMode.*"]
        }, {
            id: "workbench/browser",
            label: ( localize(12581, "Browser")),
            settings: ["workbench.browser.*"]
        }]
    }, {
        id: "window",
        label: ( localize(12582, "Window")),
        settings: ["window.*"],
        children: [{
            id: "window/newWindow",
            label: ( localize(12583, "New Window")),
            settings: ["window.*newwindow*"]
        }]
    }, {
        id: "chat",
        label: ( localize(12584, "Chat")),
        children: [{
            id: "chat/agent",
            label: ( localize(12585, "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(12586, "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(12587, "Sessions")),
            settings: [
                "chat.agentSessionProjection.*",
                "chat.sessions.*",
                "chat.viewProgressBadge.*",
                "chat.viewSessions.*",
                "chat.restoreLastPanelSession",
                "chat.exitAfterDelegation",
                "chat.repoInfo.*"
            ]
        }, {
            id: "chat/tools",
            label: ( localize(12588, "Tools")),
            settings: ["chat.tools.*", "chat.extensionTools.*"]
        }, {
            id: "chat/mcp",
            label: ( localize(12589, "MCP")),
            settings: ["mcp", "chat.mcp.*", "mcp.*"]
        }, {
            id: "chat/context",
            label: ( localize(12590, "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(12591, "Inline Chat")),
            settings: ["inlineChat.*"]
        }, {
            id: "chat/miscellaneous",
            label: ( localize(12592, "Miscellaneous")),
            settings: ["chat.disableAIFeatures", "chat.allowAnonymousAccess"]
        }]
    }, {
        id: "features",
        label: ( localize(12593, "Features")),
        children: [{
            id: "features/accessibilitySignals",
            label: ( localize(12594, "Accessibility Signals")),
            settings: ["accessibility.signal*"]
        }, {
            id: "features/accessibility",
            label: ( localize(12595, "Accessibility")),
            settings: ["accessibility.*"]
        }, {
            id: "features/explorer",
            label: ( localize(12596, "Explorer")),
            settings: ["explorer.*", "outline.*"]
        }, {
            id: "features/search",
            label: ( localize(12597, "Search")),
            settings: ["search.*"]
        }, {
            id: "features/debug",
            label: ( localize(12598, "Debug")),
            settings: ["debug.*", "launch"]
        }, {
            id: "features/testing",
            label: ( localize(12599, "Testing")),
            settings: ["testing.*"]
        }, {
            id: "features/scm",
            label: ( localize(12600, "Source Control")),
            settings: ["scm.*"]
        }, {
            id: "features/extensions",
            label: ( localize(12601, "Extensions")),
            settings: ["extensions.*"]
        }, {
            id: "features/terminal",
            label: ( localize(12602, "Terminal")),
            settings: ["terminal.*"]
        }, {
            id: "features/task",
            label: ( localize(12603, "Task")),
            settings: ["task.*"]
        }, {
            id: "features/problems",
            label: ( localize(12604, "Problems")),
            settings: ["problems.*"]
        }, {
            id: "features/output",
            label: ( localize(12605, "Output")),
            settings: ["output.*"]
        }, {
            id: "features/comments",
            label: ( localize(12606, "Comments")),
            settings: ["comments.*"]
        }, {
            id: "features/remote",
            label: ( localize(12607, "Remote")),
            settings: ["remote.*"]
        }, {
            id: "features/timeline",
            label: ( localize(12608, "Timeline")),
            settings: ["timeline.*"]
        }, {
            id: "features/notebook",
            label: ( localize(12609, "Notebook")),
            settings: ["notebook.*", "interactiveWindow.*"]
        }, {
            id: "features/mergeEditor",
            label: ( localize(12610, "Merge Editor")),
            settings: ["mergeEditor.*"]
        }, {
            id: "features/issueReporter",
            label: ( localize(12611, "Issue Reporter")),
            settings: ["issueReporter.*"],
            hide: !isWeb
        }]
    }, {
        id: "application",
        label: ( localize(12612, "Application")),
        children: [{
            id: "application/http",
            label: ( localize(12613, "Proxy")),
            settings: ["http.*"]
        }, {
            id: "application/keyboard",
            label: ( localize(12614, "Keyboard")),
            settings: ["keyboard.*"]
        }, {
            id: "application/update",
            label: ( localize(12615, "Update")),
            settings: ["update.*"]
        }, {
            id: "application/telemetry",
            label: ( localize(12616, "Telemetry")),
            settings: ["telemetry.*"]
        }, {
            id: "application/settingsSync",
            label: ( localize(12617, "Settings Sync")),
            settings: ["settingsSync.*"]
        }, {
            id: "application/network",
            label: ( localize(12618, "Network")),
            settings: ["network.*"]
        }, {
            id: "application/experimental",
            label: ( localize(12619, "Experimental")),
            settings: ["application.experimental.*"]
        }, {
            id: "application/other",
            label: ( localize(12620, "Other")),
            settings: ["application.*"],
            hide: isWindows
        }]
    }, {
        id: "security",
        label: ( localize(12621, "Security")),
        settings: ["security.*"],
        children: [{
            id: "security/workspace",
            label: ( localize(12622, "Workspace")),
            settings: ["security.workspace.*"]
        }]
    }]
};

export { getCommonlyUsedData, tocData };
