import { j as a } from "../../node_modules/react/jsx-runtime.mjs";
import { useState as _, useEffect as y, useMemo as C } from "react";
import f from "./ColumnData.mjs";
import h, { CalendarTypeEnum as d } from "./BitzFuiCalendarStore.mjs";
const B = (n) => {
  const { CalendarType: s, currentDay: i } = h((e) => e), l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23], [m, c] = _([]);
  y(() => {
    const e = [];
    for (let t = 0; t < 24 * 2; t++)
      e.push(t / 2);
    c(e);
  }, []);
  const u = C(() => {
    if (s === d.day)
      return [i];
    if (s === d.workWeek) {
      const e = [], t = i.startOf("week");
      for (let r = 1; r <= 5; r++)
        e.push(t.add(r, "day"));
      return e;
    }
    if (s === d.week) {
      const e = [], t = i.startOf("week");
      for (let r = 1; r <= 7; r++)
        e.push(t.add(r, "day"));
      return e;
    }
    return [i];
  }, [s, i]);
  return /* @__PURE__ */ a.jsx("div", { className: "bitzFuiCalendarBody", children: /* @__PURE__ */ a.jsxs("div", { className: "bitzFuiCalendarBodyContainer", children: [
    /* @__PURE__ */ a.jsx("div", { className: "bitzFuiCalendarBody__time", children: l.map((e, t) => /* @__PURE__ */ a.jsxs(
      "span",
      {
        className: "bitzFuiCalendarBody__time__item",
        children: [
          t,
          "时"
        ]
      },
      t + "b"
    )) }),
    /* @__PURE__ */ a.jsx("div", { className: "bitzFuiCalendarBody__content", children: u.map((e, t) => /* @__PURE__ */ a.jsxs("div", { className: "bitzFuiCalendarBody__content__row", children: [
      /* @__PURE__ */ a.jsx("div", { className: "bitzFuiCalendarBody__content__row__list", children: m.map((r, o) => /* @__PURE__ */ a.jsx(
        "div",
        {
          className: "bitzFuiCalendarBody__content__row__item",
          style: {
            minHeight: "4.05rem",
            borderBottomStyle: o % 2 ? "solid" : "dashed"
          }
        },
        o
      )) }),
      /* @__PURE__ */ a.jsx(f, { time: e, list: n == null ? void 0 : n.data })
    ] }, t)) })
  ] }) });
}, z = B;
export {
  z as default
};
