"use client";
import { jsxs as a, jsx as r } from "react/jsx-runtime";
import u from "react";
import { Badge as b } from "../badge.js";
import { useCalendar as p } from "./calendar-context.js";
const N = () => {
  const {
    calendarStartHour: t = 6,
    calendarEndHour: d = 18,
    enableGrouping: s,
    groupLabel: i
  } = p(), c = u.useMemo(() => {
    const e = d - t + 1;
    return Array.from({ length: e }, (n, m) => {
      const o = m + t, l = o < 12 ? "AM" : "PM";
      return {
        label: `${(o % 12 === 0 ? 12 : o % 12).toString().padStart(2, "0")}:00`,
        ampm: l
      };
    });
  }, [t, d]);
  return /* @__PURE__ */ a("div", { className: "border-d-border bg-d-card z-20 flex-shrink-0 border-r px-2", children: [
    /* @__PURE__ */ r("div", { className: "border-d-border h-14 border-b" }),
    s && /* @__PURE__ */ r("div", { className: "border-d-border flex min-h-[2.5rem] items-center justify-center border-b", children: /* @__PURE__ */ r(b, { variant: "outline", children: i }) }),
    /* @__PURE__ */ r("div", { className: "relative", children: c.map(({ label: e, ampm: n }) => /* @__PURE__ */ a(
      "div",
      {
        className: "text-d-muted-foreground border-d-border/50 flex h-16 items-center justify-center gap-2 border-b text-sm font-medium",
        style: { height: "64px" },
        children: [
          /* @__PURE__ */ r("span", { children: e }),
          /* @__PURE__ */ r("span", { className: "text-xs font-normal uppercase opacity-70", children: n })
        ]
      },
      e
    )) })
  ] });
};
export {
  N as TimeColumn
};
