/**
 * Auto-generated template registry index
 * Generated on: 2025-07-27T21:25:00.112Z
 *
 * This file is auto-generated by scripts/generate-template-metadata.js
 * Do not edit manually - your changes will be overwritten.
 */
// Template metadata imports
import ecommercePlatformMetadata from './ecommerce-platform.json' with { type: 'json' };
import blogPublishingPlatformMetadata from './blog-publishing-platform.json' with { type: 'json' };
/**
 * Registry of all available template metadata
 */
export const TEMPLATE_METADATA_REGISTRY = {
    'ecommerce-platform': ecommercePlatformMetadata,
    'blog-publishing-platform': blogPublishingPlatformMetadata,
};
/**
 * Array of all template IDs for iteration
 */
export const TEMPLATE_IDS = [
    'ecommerce-platform',
    'blog-publishing-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,
    };
}
//# sourceMappingURL=index.js.map