"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { Check, X, AlertTriangle, Minus, Circle } from "lucide-react";
import { useT } from "@open-mercato/shared/lib/i18n/context";
function BooleanIcon({ value, trueLabel, falseLabel, className }) {
  const v = !!value;
  return /* @__PURE__ */ jsxs("span", { className: `inline-flex items-center gap-1 ${className ?? ""}`, children: [
    v ? /* @__PURE__ */ jsx(Check, { className: "size-4 text-emerald-600" }) : /* @__PURE__ */ jsx(X, { className: "size-4 text-muted-foreground" }),
    v && trueLabel ? /* @__PURE__ */ jsx("span", { className: "text-xs", children: trueLabel }) : null,
    !v && falseLabel ? /* @__PURE__ */ jsx("span", { className: "text-xs", children: falseLabel }) : null
  ] });
}
function EnumBadge({ value, map, fallback }) {
  if (!value) return /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: fallback ?? "\u2014" });
  const cfg = map[value] || { label: String(value) };
  return /* @__PURE__ */ jsxs("span", { className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs border ${cfg.className ?? ""}`, children: [
    cfg.icon,
    /* @__PURE__ */ jsx("span", { children: cfg.label })
  ] });
}
function useSeverityPreset() {
  const t = useT();
  return {
    low: { label: t("ui.badges.severity.low", "Low"), className: "border-amber-200 text-amber-700 bg-amber-50", icon: /* @__PURE__ */ jsx(Circle, { className: "size-3" }) },
    medium: { label: t("ui.badges.severity.medium", "Medium"), className: "border-yellow-200 text-yellow-800 bg-yellow-50", icon: /* @__PURE__ */ jsx(Minus, { className: "size-3" }) },
    high: { label: t("ui.badges.severity.high", "High"), className: "border-red-200 text-red-700 bg-red-50", icon: /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3" }) }
  };
}
export {
  BooleanIcon,
  EnumBadge,
  useSeverityPreset
};
//# sourceMappingURL=ValueIcons.js.map
