/**
 * Auto-generated template registry index
 * Generated on: 2025-08-09T20:52:36.596Z
 *
 * This file is auto-generated by scripts/generate-template-metadata.js
 * Do not edit manually - your changes will be overwritten.
 */
import * as domains from '../verticals/index.js';
// Template metadata imports
import ecommercePlatformMetadata from './ecommerce-platform.json' with { type: 'json' };
import blogPublishingPlatformMetadata from './blog-publishing-platform.json' with { type: 'json' };
import healthcareManagementPlatformMetadata from './healthcare-management-platform.json' with { type: 'json' };
import financialServicesPlatformMetadata from './financial-services-platform.json' with { type: 'json' };
import educationManagementPlatformMetadata from './education-management-platform.json' with { type: 'json' };
import realEstateManagementPlatformMetadata from './real-estate-management-platform.json' with { type: 'json' };
import manufacturingPlatformMetadata from './manufacturing-platform.json' with { type: 'json' };
import hospitalityPlatformMetadata from './hospitality-platform.json' with { type: 'json' };
import legalServicesPlatformMetadata from './legal-services-platform.json' with { type: 'json' };
import nonProfitPlatformMetadata from './non-profit-platform.json' with { type: 'json' };
import iotSmartHomePlatformMetadata from './iot-smart-home-platform.json' with { type: 'json' };
import gamingPlatformMetadata from './gaming-platform.json' with { type: 'json' };
/**
 * Registry of all available template metadata
 */
export const TEMPLATE_METADATA_REGISTRY = {
    'ecommerce-platform': ecommercePlatformMetadata,
    'blog-publishing-platform': blogPublishingPlatformMetadata,
    'healthcare-management-platform': healthcareManagementPlatformMetadata,
    'financial-services-platform': financialServicesPlatformMetadata,
    'education-management-platform': educationManagementPlatformMetadata,
    'real-estate-management-platform': realEstateManagementPlatformMetadata,
    'manufacturing-platform': manufacturingPlatformMetadata,
    'hospitality-platform': hospitalityPlatformMetadata,
    'legal-services-platform': legalServicesPlatformMetadata,
    'non-profit-platform': nonProfitPlatformMetadata,
    'iot-smart-home-platform': iotSmartHomePlatformMetadata,
    'gaming-platform': gamingPlatformMetadata,
};
/**
 * Array of all template IDs for iteration
 */
export const TEMPLATE_IDS = [
    'ecommerce-platform',
    'blog-publishing-platform',
    'healthcare-management-platform',
    'financial-services-platform',
    'education-management-platform',
    'real-estate-management-platform',
    'manufacturing-platform',
    'hospitality-platform',
    'legal-services-platform',
    'non-profit-platform',
    'iot-smart-home-platform',
    'gaming-platform',
];
/**
 * Template categories for filtering
 */
export const TEMPLATE_CATEGORIES = {
    business: ['e-commerce', 'retail', 'business', 'inventory', 'orders', 'crm', 'finance'],
    content: ['blog', 'cms', 'publishing', 'content', 'media', 'editorial'],
    social: ['social', 'community', 'networking', 'communication'],
    technical: ['api', 'service', 'microservice', 'system', 'integration'],
};
/**
 * Get all templates
 */
export function getAllTemplates() {
    return Object.values(TEMPLATE_METADATA_REGISTRY);
}
/**
 * Get template by ID
 */
export function getTemplate(id) {
    return TEMPLATE_METADATA_REGISTRY[id];
}
/**
 * Get templates by tag
 */
export function getTemplatesByTag(tag) {
    return getAllTemplates().filter((template) => template.tags.includes(tag.toLowerCase()));
}
/**
 * Get templates by category
 */
export function getTemplatesByCategory(category) {
    const categoryTags = TEMPLATE_CATEGORIES[category] || [];
    return getAllTemplates().filter((template) => template.tags.some((tag) => categoryTags.includes(tag)));
}
/**
 * Search templates
 */
export function searchTemplates(query) {
    const searchTerm = query.toLowerCase();
    return getAllTemplates().filter((template) => template.name.toLowerCase().includes(searchTerm) ||
        template.description.toLowerCase().includes(searchTerm) ||
        template.tags.some((tag) => tag.includes(searchTerm)));
}
/**
 * Get template statistics
 */
export function getTemplateStats() {
    const templates = getAllTemplates();
    const totalEntities = templates.reduce((sum, t) => sum + t.structure.domain.totalEntities, 0);
    const totalProperties = templates.reduce((sum, t) => sum + t.structure.domain.totalProperties, 0);
    const totalAssociations = templates.reduce((sum, t) => sum + t.structure.domain.totalAssociations, 0);
    const categoryCounts = {};
    templates.forEach((template) => {
        template.tags.forEach((tag) => {
            categoryCounts[tag] = (categoryCounts[tag] || 0) + 1;
        });
    });
    return {
        totalTemplates: templates.length,
        totalEntities,
        totalProperties,
        totalAssociations,
        categoryCounts,
    };
}
/**
 * Creates a domain by its ID
 * @param id The ID of the template
 * @param options Options for creating the template
 * @returns The created data domain
 */
export function createDomainById(id, options) {
    const map = new Map();
    map.set('ecommerce-platform', 'createEcommerceDomain');
    map.set('blog-publishing-platform', 'createBlogDomain');
    map.set('healthcare-management-platform', 'createHealthcareDomain');
    map.set('financial-services-platform', 'createFinancialServicesDomain');
    map.set('education-management-platform', 'createEducationDomain');
    map.set('real-estate-management-platform', 'createRealEstateDomain');
    map.set('manufacturing-platform', 'createManufacturingDomain');
    map.set('hospitality-platform', 'createHospitalityDomain');
    map.set('legal-services-platform', 'createLegalServicesDomain');
    map.set('non-profit-platform', 'createNonProfitDomain');
    map.set('iot-smart-home-platform', 'createIoTSmartHomeDomain');
    map.set('gaming-platform', 'createGamingDomain');
    const createDomainFn = map.get(id);
    if (!createDomainFn) {
        throw new Error(`No create function found for template ID ${id}`);
    }
    if (typeof domains[createDomainFn] !== 'function') {
        throw new Error(`Function ${createDomainFn} is not defined in domains module`);
    }
    return domains[createDomainFn](options);
}
//# sourceMappingURL=index.js.map