import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { cn } from '../../utils/cn.js';
export function FileManagerButton({ file_count, on_click, disabled = false, class_name, }) {
    const has_files = file_count > 0;
    return (_jsxs("button", { type: "button", className: cn('cls_data_form_file_manager_btn', 'inline-flex items-center gap-1.5 px-3 py-1.5 rounded border text-sm transition-colors', has_files
            ? 'border-sky-300 text-sky-700 bg-sky-50 hover:bg-sky-100'
            : 'border-gray-300 text-gray-600 bg-white hover:bg-gray-50', disabled && 'opacity-50 cursor-not-allowed', class_name), onClick: on_click, disabled: disabled, children: [has_files ? (_jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) })) : (_jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) })), _jsx("span", { children: "Files" }), has_files && (_jsx("span", { className: cn('inline-flex items-center justify-center min-w-[18px] h-[18px] rounded-full text-[10px] font-bold', 'bg-sky-600 text-white'), children: file_count }))] }));
}
//# sourceMappingURL=file_manager_button.js.map