import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { cn } from '../../../utils/cn.js';
import { to_inline_style } from '../../../utils/style_resolver.js';
export function DataFormBadge({ badge, formula_label, config, column_width }) {
    if (!badge && !formula_label)
        return null;
    const { style_resolver } = config;
    const badge_style = style_resolver.has_style('badge')
        ? to_inline_style(style_resolver.resolve('badge'))
        : undefined;
    return (_jsxs("div", { className: cn('cls_data_form_badge', 'flex items-center gap-1.5 shrink-0'), style: column_width ? { width: column_width } : undefined, children: [badge && (_jsx("span", { className: "cls_data_form_badge_pill inline-flex items-center justify-center", style: badge_style, children: badge })), formula_label && (_jsx("span", { className: "cls_data_form_formula_label text-xs text-gray-500 whitespace-nowrap", children: formula_label }))] }));
}
//# sourceMappingURL=data_form_badge.js.map