/**
 * FileBarTag — Classification tag pill with expand/collapse for date + nature details.
 */
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useState } from 'react';
import { cn } from '../../../utils/cn.js';
export function FileBarTag({ tags, meta }) {
    const [expanded, set_expanded] = useState(false);
    if (!tags?.length && !meta?.document_date && !meta?.document_nature)
        return null;
    const has_meta = !!(meta?.document_date || meta?.document_nature);
    return (_jsxs("div", { className: "inline-flex items-center gap-0.5 flex-shrink-0", children: [tags?.map((tag) => (_jsx("button", { type: "button", onClick: has_meta ? () => set_expanded(!expanded) : undefined, className: cn('inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium', 'bg-gray-100 text-gray-600', has_meta && 'cursor-pointer hover:opacity-80', tag.tooltip && !has_meta && 'cursor-help'), title: tag.tooltip || tag.label, children: tag.label }, tag.id))), expanded && has_meta && (_jsx("span", { className: "text-[9px] text-muted-foreground/50 italic whitespace-nowrap", children: [meta.document_nature, meta.document_date].filter(Boolean).join(' · ') }))] }));
}
//# sourceMappingURL=file_bar_tag.js.map