"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { useT } from "@open-mercato/shared/lib/i18n/context";
function MessageReceivedRenderer({ notification }) {
  const t = useT();
  const senderName = notification.metadata?.senderDisplayName ?? notification.metadata?.senderIdentifier ?? t("communication_channels.notifications.message_received.unknownSender", "Unknown sender");
  const channelLabel = notification.metadata?.channelDisplayName ?? notification.metadata?.providerKey ?? "";
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
    /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: notification.title ?? t("communication_channels.notifications.message_received.title", "New external message") }),
    /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: channelLabel ? `${senderName} \xB7 ${channelLabel}` : senderName }),
    notification.body ? /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground line-clamp-2", children: notification.body }) : null
  ] });
}
var MessageReceivedRenderer_default = MessageReceivedRenderer;
export {
  MessageReceivedRenderer,
  MessageReceivedRenderer_default as default
};
//# sourceMappingURL=MessageReceivedRenderer.js.map
