"use strict";
/**
 * shadcn/ui Primitive Catalog
 *
 * A comprehensive catalog of shadcn/ui components with their purposes,
 * use cases, and relationships. Used by the Primitive Mapping stage
 * to map abstract UI patterns to concrete component choices.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.SHADCN_PRIMITIVE_CATALOG = void 0;
exports.getComponentsByCategory = getComponentsByCategory;
exports.findComponentsByPattern = findComponentsByPattern;
exports.getComponentByName = getComponentByName;
exports.getAllComponentNames = getAllComponentNames;
exports.recommendComponentsForSection = recommendComponentsForSection;
exports.SHADCN_PRIMITIVE_CATALOG = [
    // ACTION COMPONENTS
    {
        name: "button",
        importPath: "@/components/ui/button",
        category: "action",
        purpose: "Primary interactive element for triggering actions",
        uiPatterns: [
            "CTA button",
            "Submit button",
            "Action trigger",
            "Link-styled button",
            "Icon button"
        ],
        radixPrimitives: ["@radix-ui/react-slot"],
        typicalProps: ["variant", "size", "asChild"],
        relatedComponents: ["link-button", "icon-button"]
    },
    // DISPLAY COMPONENTS
    {
        name: "card",
        importPath: "@/components/ui/card",
        category: "display",
        purpose: "Container for grouping related content with visual hierarchy",
        uiPatterns: [
            "Feature card",
            "Product card",
            "Testimonial card",
            "Stat card",
            "Info panel"
        ],
        typicalProps: ["className"],
        relatedComponents: ["badge", "separator"]
    },
    {
        name: "badge",
        importPath: "@/components/ui/badge",
        category: "display",
        purpose: "Small label for categorization or status indication",
        uiPatterns: [
            "Status indicator",
            "Tag",
            "Category label",
            "Count indicator",
            "Feature highlight"
        ],
        typicalProps: ["variant"],
        relatedComponents: ["card"]
    },
    {
        name: "avatar",
        importPath: "@/components/ui/avatar",
        category: "display",
        purpose: "User or entity visual representation",
        uiPatterns: [
            "User profile picture",
            "Testimonial author",
            "Team member",
            "Author attribution"
        ],
        radixPrimitives: ["@radix-ui/react-avatar"],
        relatedComponents: ["card"]
    },
    {
        name: "separator",
        importPath: "@/components/ui/separator",
        category: "layout",
        purpose: "Visual divider between content sections",
        uiPatterns: [
            "Section divider",
            "Content separator",
            "List item divider"
        ],
        radixPrimitives: ["@radix-ui/react-separator"],
        relatedComponents: []
    },
    // INPUT COMPONENTS
    {
        name: "input",
        importPath: "@/components/ui/input",
        category: "input",
        purpose: "Single-line text input field",
        uiPatterns: [
            "Email input",
            "Text field",
            "Search box",
            "Number input"
        ],
        typicalProps: ["type", "placeholder", "value", "onChange"],
        relatedComponents: ["label", "form"]
    },
    {
        name: "textarea",
        importPath: "@/components/ui/textarea",
        category: "input",
        purpose: "Multi-line text input field",
        uiPatterns: [
            "Message field",
            "Comment box",
            "Description input",
            "Long-form text"
        ],
        typicalProps: ["placeholder", "value", "onChange", "rows"],
        relatedComponents: ["label", "form"]
    },
    {
        name: "label",
        importPath: "@/components/ui/label",
        category: "input",
        purpose: "Accessible label for form inputs",
        uiPatterns: [
            "Form field label",
            "Input description",
            "Checkbox label"
        ],
        radixPrimitives: ["@radix-ui/react-label"],
        relatedComponents: ["input", "textarea", "checkbox", "radio-group"]
    },
    {
        name: "checkbox",
        importPath: "@/components/ui/checkbox",
        category: "input",
        purpose: "Boolean selection control",
        uiPatterns: [
            "Agreement checkbox",
            "Feature selection",
            "Multi-select option"
        ],
        radixPrimitives: ["@radix-ui/react-checkbox"],
        relatedComponents: ["label"]
    },
    {
        name: "radio-group",
        importPath: "@/components/ui/radio-group",
        category: "input",
        purpose: "Single-selection from multiple options",
        uiPatterns: [
            "Plan selection",
            "Option picker",
            "Single choice"
        ],
        radixPrimitives: ["@radix-ui/react-radio-group"],
        relatedComponents: ["label"]
    },
    {
        name: "select",
        importPath: "@/components/ui/select",
        category: "input",
        purpose: "Dropdown selection menu",
        uiPatterns: [
            "Dropdown menu",
            "Option selector",
            "Category picker"
        ],
        radixPrimitives: ["@radix-ui/react-select"],
        relatedComponents: ["label"]
    },
    // NAVIGATION COMPONENTS
    {
        name: "navigation-menu",
        importPath: "@/components/ui/navigation-menu",
        category: "navigation",
        purpose: "Primary site navigation with nested menus",
        uiPatterns: [
            "Header navigation",
            "Main menu",
            "Product navigation",
            "Multi-level menu"
        ],
        radixPrimitives: ["@radix-ui/react-navigation-menu"],
        relatedComponents: ["dropdown-menu"]
    },
    {
        name: "dropdown-menu",
        importPath: "@/components/ui/dropdown-menu",
        category: "navigation",
        purpose: "Contextual menu triggered by user action",
        uiPatterns: [
            "Context menu",
            "Action menu",
            "Options menu",
            "User menu"
        ],
        radixPrimitives: ["@radix-ui/react-dropdown-menu"],
        relatedComponents: ["navigation-menu", "button"]
    },
    {
        name: "tabs",
        importPath: "@/components/ui/tabs",
        category: "navigation",
        purpose: "Content organization with multiple views",
        uiPatterns: [
            "Tabbed content",
            "View switcher",
            "Feature showcase",
            "Content sections"
        ],
        radixPrimitives: ["@radix-ui/react-tabs"],
        relatedComponents: ["card"]
    },
    {
        name: "breadcrumb",
        importPath: "@/components/ui/breadcrumb",
        category: "navigation",
        purpose: "Hierarchical navigation trail",
        uiPatterns: [
            "Page trail",
            "Navigation path",
            "Location indicator"
        ],
        relatedComponents: []
    },
    // FEEDBACK COMPONENTS
    {
        name: "alert",
        importPath: "@/components/ui/alert",
        category: "feedback",
        purpose: "Informational message or warning",
        uiPatterns: [
            "Info message",
            "Warning notice",
            "Success message",
            "Error notification"
        ],
        typicalProps: ["variant"],
        relatedComponents: ["alert-dialog"]
    },
    {
        name: "toast",
        importPath: "@/components/ui/toast",
        category: "feedback",
        purpose: "Temporary notification message",
        uiPatterns: [
            "Success notification",
            "Error message",
            "Info toast",
            "Confirmation message"
        ],
        radixPrimitives: ["@radix-ui/react-toast"],
        relatedComponents: ["alert"]
    },
    {
        name: "progress",
        importPath: "@/components/ui/progress",
        category: "feedback",
        purpose: "Visual indicator of completion",
        uiPatterns: [
            "Loading bar",
            "Completion indicator",
            "Progress tracker"
        ],
        radixPrimitives: ["@radix-ui/react-progress"],
        relatedComponents: []
    },
    // OVERLAY COMPONENTS
    {
        name: "dialog",
        importPath: "@/components/ui/dialog",
        category: "overlay",
        purpose: "Modal dialog for focused interaction",
        uiPatterns: [
            "Modal popup",
            "Confirmation dialog",
            "Form modal",
            "Detail view"
        ],
        radixPrimitives: ["@radix-ui/react-dialog"],
        relatedComponents: ["alert-dialog", "sheet"]
    },
    {
        name: "alert-dialog",
        importPath: "@/components/ui/alert-dialog",
        category: "overlay",
        purpose: "Modal for critical confirmations",
        uiPatterns: [
            "Confirmation prompt",
            "Warning dialog",
            "Destructive action confirmation"
        ],
        radixPrimitives: ["@radix-ui/react-alert-dialog"],
        relatedComponents: ["dialog"]
    },
    {
        name: "sheet",
        importPath: "@/components/ui/sheet",
        category: "overlay",
        purpose: "Slide-out panel for secondary content",
        uiPatterns: [
            "Mobile menu",
            "Side panel",
            "Drawer",
            "Filter panel"
        ],
        radixPrimitives: ["@radix-ui/react-dialog"],
        relatedComponents: ["dialog"]
    },
    {
        name: "popover",
        importPath: "@/components/ui/popover",
        category: "overlay",
        purpose: "Floating content container",
        uiPatterns: [
            "Tooltip content",
            "Info popup",
            "Action popover",
            "Contextual help"
        ],
        radixPrimitives: ["@radix-ui/react-popover"],
        relatedComponents: ["tooltip", "dropdown-menu"]
    },
    {
        name: "tooltip",
        importPath: "@/components/ui/tooltip",
        category: "overlay",
        purpose: "Brief informational overlay on hover",
        uiPatterns: [
            "Help text",
            "Icon explanation",
            "Contextual hint"
        ],
        radixPrimitives: ["@radix-ui/react-tooltip"],
        relatedComponents: ["popover"]
    },
    {
        name: "hover-card",
        importPath: "@/components/ui/hover-card",
        category: "overlay",
        purpose: "Rich preview on hover",
        uiPatterns: [
            "Link preview",
            "User profile card",
            "Content preview"
        ],
        radixPrimitives: ["@radix-ui/react-hover-card"],
        relatedComponents: ["popover", "card"]
    },
    // LAYOUT COMPONENTS
    {
        name: "accordion",
        importPath: "@/components/ui/accordion",
        category: "layout",
        purpose: "Collapsible content sections",
        uiPatterns: [
            "FAQ section",
            "Expandable list",
            "Collapsible panels",
            "Step-by-step guide"
        ],
        radixPrimitives: ["@radix-ui/react-accordion"],
        relatedComponents: ["card"]
    },
    {
        name: "collapsible",
        importPath: "@/components/ui/collapsible",
        category: "layout",
        purpose: "Single expandable/collapsible section",
        uiPatterns: [
            "Show more/less",
            "Expandable content",
            "Toggle section"
        ],
        radixPrimitives: ["@radix-ui/react-collapsible"],
        relatedComponents: ["accordion"]
    },
    {
        name: "carousel",
        importPath: "@/components/ui/carousel",
        category: "layout",
        purpose: "Scrollable content slider",
        uiPatterns: [
            "Image slider",
            "Testimonial carousel",
            "Feature showcase",
            "Product gallery"
        ],
        relatedComponents: ["card"]
    },
    {
        name: "aspect-ratio",
        importPath: "@/components/ui/aspect-ratio",
        category: "layout",
        purpose: "Maintain aspect ratio container",
        uiPatterns: [
            "Video container",
            "Image container",
            "Responsive media"
        ],
        radixPrimitives: ["@radix-ui/react-aspect-ratio"],
        relatedComponents: []
    },
    {
        name: "scroll-area",
        importPath: "@/components/ui/scroll-area",
        category: "layout",
        purpose: "Custom scrollable region",
        uiPatterns: [
            "Scrollable list",
            "Content overflow",
            "Sidebar content"
        ],
        radixPrimitives: ["@radix-ui/react-scroll-area"],
        relatedComponents: []
    }
];
/**
 * Get all components by category
 */
function getComponentsByCategory(category) {
    return exports.SHADCN_PRIMITIVE_CATALOG.filter(comp => comp.category === category);
}
/**
 * Find components that match a UI pattern
 */
function findComponentsByPattern(pattern) {
    const lowerPattern = pattern.toLowerCase();
    return exports.SHADCN_PRIMITIVE_CATALOG.filter(comp => comp.uiPatterns.some(p => p.toLowerCase().includes(lowerPattern)) ||
        comp.purpose.toLowerCase().includes(lowerPattern));
}
/**
 * Get component by name
 */
function getComponentByName(name) {
    return exports.SHADCN_PRIMITIVE_CATALOG.find(comp => comp.name === name);
}
/**
 * Get all available component names
 */
function getAllComponentNames() {
    return exports.SHADCN_PRIMITIVE_CATALOG.map(comp => comp.name);
}
/**
 * Recommend components for a section purpose
 */
function recommendComponentsForSection(sectionPurpose) {
    const keywords = sectionPurpose.toLowerCase().split(/\s+/);
    const scored = exports.SHADCN_PRIMITIVE_CATALOG.map(comp => {
        let score = 0;
        // Match against purpose
        keywords.forEach(keyword => {
            if (comp.purpose.toLowerCase().includes(keyword))
                score += 3;
            comp.uiPatterns.forEach(pattern => {
                if (pattern.toLowerCase().includes(keyword))
                    score += 2;
            });
        });
        return { component: comp, score };
    });
    return scored
        .filter(item => item.score > 0)
        .sort((a, b) => b.score - a.score)
        .slice(0, 5)
        .map(item => item.component);
}
//# sourceMappingURL=shadcn-primitive-catalog.js.map