
import { localize } from '../../../../nls.js';
import { EXTENSION_IDENTIFIER_PATTERN } from '../../../../platform/extensionManagement/common/extensionManagement.js';

const ExtensionsConfigurationSchemaId = "vscode://schemas/extensions";
const ExtensionsConfigurationSchema = {
    id: ExtensionsConfigurationSchemaId,
    allowComments: true,
    allowTrailingCommas: true,
    type: "object",
    title: ( localize(9420, "Extensions")),
    additionalProperties: false,
    properties: {
        recommendations: {
            type: "array",
            description: ( localize(
                9421,
                "List of extensions which should be recommended for users of this workspace. The identifier of an extension is always '${publisher}.${name}'. For example: 'vscode.csharp'."
            )),
            items: {
                type: "string",
                pattern: EXTENSION_IDENTIFIER_PATTERN,
                errorMessage: ( localize(9422, "Expected format '${publisher}.${name}'. Example: 'vscode.csharp'."))
            }
        },
        unwantedRecommendations: {
            type: "array",
            description: ( localize(
                9423,
                "List of extensions recommended by VS Code that should not be recommended for users of this workspace. The identifier of an extension is always '${publisher}.${name}'. For example: 'vscode.csharp'."
            )),
            items: {
                type: "string",
                pattern: EXTENSION_IDENTIFIER_PATTERN,
                errorMessage: ( localize(9422, "Expected format '${publisher}.${name}'. Example: 'vscode.csharp'."))
            }
        }
    }
};
const ExtensionsConfigurationInitialContent = [
    "{",
    "\t// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.",
    "\t// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp",
    "",
    "\t// List of extensions which should be recommended for users of this workspace.",
    "\t\"recommendations\": [",
    "\t\t",
    "\t],",
    "\t// List of extensions recommended by VS Code that should not be recommended for users of this workspace.",
    "\t\"unwantedRecommendations\": [",
    "\t\t",
    "\t]",
    "}"
].join("\n");

export { ExtensionsConfigurationInitialContent, ExtensionsConfigurationSchema, ExtensionsConfigurationSchemaId };
