// SPEC-597-EXEMPT: canonical mapping (npm-package↔framework, keyword catalogue)
// — must enumerate framework names by design; no detection logic to migrate.
// tools/suggest-tooling/css-framework-catalog.ts — CSS framework detection and recommendations
// SPEC-017a: CSS framework recommendation for frontend/fullstack web stacks
/**
 * Build CSS framework recommendation lines based on detected or missing framework.
 * Only recommends for frontend/fullstack web stacks.
 */
export function buildCSSFrameworkLines(knowledge, detectedFramework) {
    // Only recommend for frontend/fullstack web stacks
    const webFrameworks = ['react', 'next', 'vue', 'nuxt', 'svelte', 'sveltekit', 'angular'];
    const stackLower = knowledge.stack.map((s) => s.toLowerCase());
    const hasWebFramework = webFrameworks.some((f) => stackLower.some((s) => s.includes(f))) ||
        webFrameworks.some((f) => (knowledge.framework ?? '').toLowerCase().includes(f));
    if (!hasWebFramework) {
        return [];
    }
    if (detectedFramework) {
        return [
            '## CSS Framework',
            '',
            `**Detected:** \`${detectedFramework}\` — CSS framework found in project.`,
            'No additional recommendation needed.',
        ];
    }
    // Recommend based on stack
    const fw = (knowledge.framework ?? '').toLowerCase();
    let recommended = 'Tailwind CSS';
    let installCmd = 'npm install -D tailwindcss postcss autoprefixer && npx tailwindcss init -p';
    let reason = 'Tailwind CSS is framework-agnostic, highly customizable, and has excellent DX.';
    if (fw.includes('next') || fw.includes('react')) {
        recommended = 'Tailwind CSS or shadcn/ui';
        installCmd = 'npm install -D tailwindcss && npx shadcn@latest init';
        reason =
            'Tailwind + shadcn/ui provides accessible components with full control for React/Next.js.';
    }
    else if (fw.includes('vue') || fw.includes('nuxt')) {
        recommended = 'Tailwind CSS';
        reason = 'Tailwind CSS integrates seamlessly with Vue/Nuxt via @nuxtjs/tailwindcss module.';
    }
    return [
        '## CSS Framework Recommendation',
        '',
        `**No CSS framework detected.** Consider adopting one for consistent styling.`,
        '',
        `**Recommended:** ${recommended}`,
        `**Why:** ${reason}`,
        '',
        `**Install:** \`${installCmd}\``,
        '',
        '**Alternatives:** Bootstrap 5 (component-rich), Material UI (Google MDC), Chakra UI (accessible).',
    ];
}
//# sourceMappingURL=css-framework-catalog.js.map