import { j as e } from "../../node_modules/react/jsx-runtime.mjs";
import { useMemo as a } from "react";
import i from "./CalendarAgendum.module.less.mjs";
import _ from "../../node_modules/dayjs/dayjs.min.mjs";
import c from "../../node_modules/antd/es/button/button.mjs";
const d = (l, s) => {
  let t = s.diff(l, "minute"), m;
  if (t < 60)
    m = `${t}分钟`;
  else {
    let r = Math.floor(t / 60), n = t % 60;
    n > 0 ? m = `${r}小时 ${n}分钟` : m = `${r}小时`;
  }
  return m;
}, o = (l) => {
  const { data: s } = l, t = a(() => d(_(s == null ? void 0 : s.startTime), _(s == null ? void 0 : s.endTime)), [s]);
  return /* @__PURE__ */ e.jsx("li", { className: i.CalendarAgendumItem, children: /* @__PURE__ */ e.jsx("div", { className: i["ui-list__item__main"], children: /* @__PURE__ */ e.jsx("div", { className: i["ui-list__item__contentWrapper"], children: /* @__PURE__ */ e.jsx("div", { className: i["ui-list__itemcontent"], children: /* @__PURE__ */ e.jsx("div", { className: i["ui-list__item__container"], children: /* @__PURE__ */ e.jsx("div", { className: i["ui-list__item__container__wrap"], children: /* @__PURE__ */ e.jsxs("div", { className: i["ui-list__item__container__item"], children: [
    /* @__PURE__ */ e.jsxs("div", { className: i["ui-list__item__container__item_left"], children: [
      /* @__PURE__ */ e.jsx("div", { className: i.item_left_1, children: /* @__PURE__ */ e.jsx("div", { className: i.item_left_1_1 }) }),
      /* @__PURE__ */ e.jsxs("div", { className: i.item_left_2, children: [
        /* @__PURE__ */ e.jsx("div", { className: i.item_left_2_1, children: _(s == null ? void 0 : s.startTime).format("HH:mm") }),
        /* @__PURE__ */ e.jsx("div", { className: i.item_left_2_2, children: t })
      ] })
    ] }),
    /* @__PURE__ */ e.jsxs("div", { className: i["ui-list__item__container__item_right"], children: [
      /* @__PURE__ */ e.jsxs("div", { className: i.item_right_1, children: [
        /* @__PURE__ */ e.jsxs("div", { children: [
          /* @__PURE__ */ e.jsx("div", { className: i.item_right_1_1, children: /* @__PURE__ */ e.jsx("span", { children: "23423423423" }) }),
          /* @__PURE__ */ e.jsx("div", { className: i.item_right_1_2, children: "Microsoft Teams Meeting" })
        ] }),
        /* @__PURE__ */ e.jsx("div", { className: i.item_right_1_3, children: /* @__PURE__ */ e.jsx(c, { children: "聊天" }) })
      ] }),
      /* @__PURE__ */ e.jsx("div", { className: i.item_right_2 })
    ] })
  ] }) }) }) }) }) }) });
}, v = o;
export {
  v as default
};
