'use client';
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { brandAlignmentLabel, brandAlignmentTone } from '../lib/brand-voice-client.js';
export function BrandVoiceAlignmentBadge({ alignment, compact = false, }) {
    const tone = brandAlignmentTone(alignment.score);
    const label = brandAlignmentLabel(alignment.score);
    const errorCount = alignment.issues.filter((i) => i.severity === 'error').length;
    const warningCount = alignment.issues.filter((i) => i.severity === 'warning').length;
    return (_jsxs("div", { className: "border-border bg-muted/40 inline-flex flex-wrap items-center gap-2 rounded-md border px-2.5 py-1.5 text-sm", "aria-label": `Brand voice score ${alignment.score} out of 100`, children: [_jsxs("span", { className: `font-medium ${tone}`, children: [alignment.score, "/100"] }), _jsx("span", { className: "text-muted-foreground", children: label }), !compact && alignment.channel && (_jsxs("span", { className: "text-muted-foreground text-xs", children: ["\u00B7 ", alignment.channel.replace(/_/g, ' ')] })), (errorCount > 0 || warningCount > 0) && (_jsxs("span", { className: "text-muted-foreground text-xs", children: ["\u00B7 ", errorCount > 0 ? `${errorCount} issue${errorCount === 1 ? '' : 's'}` : '', errorCount > 0 && warningCount > 0 ? ', ' : '', warningCount > 0 ? `${warningCount} warning${warningCount === 1 ? '' : 's'}` : ''] }))] }));
}
//# sourceMappingURL=BrandVoiceAlignmentBadge.js.map