import { jsxs, jsx } from "react/jsx-runtime";
import { getAssetUrl } from "../../../../../utils/assetBase.js";
import { useTextOverflow } from "../../../../../utils/useTextOverflow.js";
import { Tooltip } from "../../../../Tooltip/index.js";
getAssetUrl("icons/checkGreeIcon.svg");
const ChatHeaderInfo = ({ title, createdBy, createdAt, chatId }) => {
  const { textRef: fullTextRef, isOverflowing: isFullTextOverflowing } = useTextOverflow();
  const fullText = `${chatId ? `ID : ${chatId} ` : ""}Created by : ${createdBy}${createdAt ? ` at : ${createdAt}` : ""}`;
  return /* @__PURE__ */ jsxs("div", { className: "chat-header-content", children: [
    /* @__PURE__ */ jsx("h1", { className: "chat-title", children: title }),
    /* @__PURE__ */ jsx(
      Tooltip,
      {
        isHoverEnabled: isFullTextOverflowing,
        orientation: "bottom",
        title: fullText,
        variant: "tertiary",
        children: /* @__PURE__ */ jsx("div", { ref: fullTextRef, className: "chat-info-container chat-text-ellipsis", children: fullText })
      }
    )
  ] });
};
export {
  ChatHeaderInfo as default
};
