"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComponentsRegistry = void 0;
/**
 * Central registry of all known components with their static metadata
 * It is best if this goes to cli configuration
 */
class ComponentsRegistry {
    static COMPONENT_REGISTRY = {
        iocd: {
            displayName: "io.Connect Desktop",
            name: "iocd",
            licenseRequired: true,
            platforms: ["win32", "darwin"],
            description: "The main io.Connect Desktop application runtime. Required component.",
            required: true,
        },
        devTools: {
            displayName: "Developer Tools",
            name: "devTools",
            licenseRequired: false,
            platforms: ["win32", "darwin"],
            description: "Developer tools for io.Connect Desktop",
        },
        demos: {
            displayName: "Web Demo Application",
            name: "demos",
            licenseRequired: false,
            platforms: ["win32", "darwin"],
            description: "A set of web-based demo applications showcasing various features of io.Connect Desktop",
        },
        bbg: {
            displayName: "Bloomberg V3 Adapter",
            name: "bbg",
            licenseRequired: true,
            platforms: ["win32", "darwin"],
            description: "Bloomberg Terminal V3 integration adapter",
        },
        // 'ppt': {
        //     displayName: 'PowerPoint Adapter',
        //     name: 'ppt',
        //     licenseRequired: true,
        //     platforms: ['win32'],
        //     description: 'PowerPoint integration adapter for io.Connect Desktop',
        // }
    };
    static getComponents() {
        return Object.values(this.COMPONENT_REGISTRY);
    }
    /**
     * Get component definition by name
     */
    static getComponentDefinition(componentName) {
        return this.COMPONENT_REGISTRY[componentName];
    }
    /**
     * Get all known component names
     */
    static getAllComponentNames() {
        return Object.keys(this.COMPONENT_REGISTRY);
    }
    /**
     * Get components that support a specific platform
     */
    static getComponentsForPlatform(platform) {
        return Object.entries(this.COMPONENT_REGISTRY)
            .filter(([, def]) => def.platforms.includes(platform))
            .map(([name]) => name);
    }
    /**
     * Check if a component exists and supports a platform
     */
    static isComponentSupported(componentName, platform) {
        const definition = this.getComponentDefinition(componentName);
        return definition ? definition.platforms.includes(platform) : false;
    }
}
exports.ComponentsRegistry = ComponentsRegistry;
//# sourceMappingURL=components.registry.js.map