/**
 * Status badges for indicating field states
 * - HiddenBadge: Yellow badge with eye-off icon for hidden fields
 * - ProtectedBadge: Blue badge with lock icon for locked/protected fields
 * - ClarificationLabelBadge: Amber badge with alert icon for fields with clarification issues
 */
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { IoEyeOff, IoLockClosed, IoAlertCircle } from 'react-icons/io5';
import { cn } from '../utils/cn.js';
/**
 * HiddenBadge component
 * Yellow badge indicating a field or section is hidden from certain users
 */
export function HiddenBadge({ text = 'Hidden', show_icon = true, className, }) {
    return (_jsxs("span", { className: cn('cls_hidden_badge inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300', className), children: [show_icon && _jsx(IoEyeOff, { className: "h-3 w-3" }), _jsx("span", { children: text })] }));
}
/**
 * ProtectedBadge component
 * Blue badge indicating a field or section is protected/locked
 */
export function ProtectedBadge({ text = 'Protected', show_icon = true, className, }) {
    return (_jsxs("span", { className: cn('cls_protected_badge inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300', className), children: [show_icon && _jsx(IoLockClosed, { className: "h-3 w-3" }), _jsx("span", { children: text })] }));
}
/**
 * ClarificationLabelBadge component
 * Amber badge indicating a field has active clarification issues.
 * Rendered before the field label text to draw attention.
 */
export function ClarificationLabelBadge({ count, indicator_only = false, className, }) {
    if (!indicator_only && (!count || count <= 0))
        return null;
    return (_jsxs("span", { className: cn('cls_clarification_label_badge inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300', className), children: [_jsx(IoAlertCircle, { className: "h-3 w-3" }), indicator_only ? (_jsx("span", { children: "!" })) : (_jsxs("span", { children: [count, " ", count === 1 ? 'issue' : 'issues'] }))] }));
}
/**
 * FileErrorLabelBadge component
 * Red badge indicating a field has files with validation errors.
 * Rendered after the field label text. Clickable when on_click is provided.
 */
export function FileErrorLabelBadge({ count, on_click, className, }) {
    if (count <= 0)
        return null;
    const badge_class = cn('cls_file_error_label_badge inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-xs bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300', on_click && 'cursor-pointer hover:bg-red-200 dark:hover:bg-red-900/70', className);
    if (on_click) {
        return (_jsxs("button", { type: "button", className: badge_class, onClick: (e) => { e.preventDefault(); e.stopPropagation(); on_click(); }, title: "View file validation issues", children: [_jsx(IoAlertCircle, { className: "h-3 w-3" }), _jsxs("span", { children: [count, " ", count === 1 ? 'issue' : 'issues'] })] }));
    }
    return (_jsxs("span", { className: badge_class, children: [_jsx(IoAlertCircle, { className: "h-3 w-3" }), _jsxs("span", { children: [count, " ", count === 1 ? 'issue' : 'issues'] })] }));
}
export default { HiddenBadge, ProtectedBadge, ClarificationLabelBadge, FileErrorLabelBadge };
//# sourceMappingURL=status_badges.js.map