"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { Heart } from "lucide-react";
import { cn } from "@open-mercato/shared/lib/utils";
import { Badge } from "@open-mercato/ui/primitives/badge";
import { HEALTH_BADGE_CLASSES, HEALTH_ICON_CLASSES } from "../healthScoreUtils.js";
function RelationshipHealthWidget({ health, t }) {
  return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border bg-card p-5", children: [
    /* @__PURE__ */ jsxs("h3", { className: "flex items-center gap-2 text-sm font-semibold text-foreground", children: [
      /* @__PURE__ */ jsx(Heart, { className: cn("size-4", HEALTH_ICON_CLASSES[health.variant]) }),
      t("customers.companies.dashboard.relationshipHealth", "Relationship health")
    ] }),
    /* @__PURE__ */ jsx("div", { className: "mt-4 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
      /* @__PURE__ */ jsxs("div", { className: "relative inline-flex items-center justify-center", children: [
        /* @__PURE__ */ jsx("span", { className: cn("text-4xl font-bold", HEALTH_ICON_CLASSES[health.variant]), children: health.score }),
        /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "/100" })
      ] }),
      /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Badge, { className: cn("text-xs", HEALTH_BADGE_CLASSES[health.variant]), children: t(`customers.health.${health.label}`, health.label) }) }),
      health.lastContactDays !== null && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
        t("customers.health.lastContact", "Last contact"),
        ": ",
        health.lastContactDays === 0 ? t("customers.health.today", "today") : t("customers.health.daysAgo", "{{days}} days ago", { days: health.lastContactDays })
      ] })
    ] }) })
  ] });
}
export {
  RelationshipHealthWidget
};
//# sourceMappingURL=RelationshipHealthWidget.js.map
