import {
  infoList,
  renderDataListItem,
  sessionList
} from "./chunk-YGIXMEJ5.js";
import {
  DataList
} from "./chunk-VTJZMOSP.js";
import {
  Heading
} from "./chunk-HK224ADT.js";
import {
  Separator
} from "./chunk-HYITAA4J.js";
import {
  Card
} from "./chunk-2ZQK7NTN.js";
import {
  Badge
} from "./chunk-EWD4AO5N.js";
import {
  Box
} from "./chunk-4Y5BEXVN.js";
import {
  Flex
} from "./chunk-25HMMI7R.js";

// src/app/platform/userInfos/coaching-customer-info/large.tsx
import { useMemo } from "react";
import {
  getColorFromProjectState,
  getTextFromProjectState
} from "@tipp/biz-utils";
import { jsx, jsxs } from "react/jsx-runtime";
function CoachingCustomerInfoLarge({
  customer,
  session,
  children
}) {
  const badgeColor = useMemo(() => {
    return getColorFromProjectState(session == null ? void 0 : session.state);
  }, [session == null ? void 0 : session.state]);
  const sessionText = useMemo(() => {
    return getTextFromProjectState(session == null ? void 0 : session.state);
  }, [session == null ? void 0 : session.state]);
  return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "5", children: [
    /* @__PURE__ */ jsxs(Box, { children: [
      /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", mb: "1", width: "100%", children: [
        /* @__PURE__ */ jsx(Heading, { variant: "heading2", children: (customer == null ? void 0 : customer.username) || "\uC774\uB984 \uC5C6\uC74C" }),
        /* @__PURE__ */ jsx(Badge, { color: badgeColor, children: sessionText })
      ] }),
      /* @__PURE__ */ jsx(Heading, { truncate: true, variant: "heading4", weight: "regular", children: customer == null ? void 0 : customer.company })
    ] }),
    children,
    /* @__PURE__ */ jsx(Card, { size: "2", children: /* @__PURE__ */ jsx(DataList.Root, { children: sessionList.map((el) => renderDataListItem(el, session)) }) }),
    /* @__PURE__ */ jsx(Separator, { size: "4" }),
    /* @__PURE__ */ jsx(DataList.Root, { children: infoList.map((info) => renderDataListItem(info, customer)) })
  ] });
}

export {
  CoachingCustomerInfoLarge
};
//# sourceMappingURL=chunk-OMHZDDO4.js.map