import { jsx as t } from "../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js";
import { memo as k } from "../../../../../external/.pnpm/preact@10.28.2/node_modules/preact/compat/dist/compat.module.js";
import { propsProperty as L, property as o } from "./utils.js";
import { CalendarGridRenderToken as u } from "../../types.js";
import { memoComparator as c } from "../../../../../utils/preact/memoComparator/main.js";
import { EMPTY_OBJECT as d } from "../../../../../utils/value/constants.js";
import { getClassName as n } from "../../../../../utils/preact/className.js";
const m = "adyen-pe-calendar__cell adyen-pe-calendar__cell--day-of-week", p = "adyen-pe-calendar__day-of-week", A = (e = d, r) => {
  const a = L.unwrapped(
    {
      childClassName: o.mutable(p),
      childProps: {
        children: o.restricted(),
        className: ""
      },
      className: o.mutable(m),
      props: {
        ...e,
        children: o.restricted(),
        className: ""
      }
    },
    !0
  );
  return r?.(u.DAY_OF_WEEK, a), a;
}, P = ({ prepare: e, flags: r, labels: { long: a, short: i } }) => {
  const l = {
    "aria-label": a,
    "data-first-week-day": r.LINE_START,
    "data-last-week-day": r.LINE_END,
    "data-weekend": r.WEEKEND,
    scope: "col"
  }, s = A(l, e), {
    children: D,
    className: _,
    onCommand: b,
    ref: N,
    ...f
  } = s.props || d, C = n(s.className, m, _), {
    children: T,
    className: E,
    ...h
  } = s.childProps || d, y = n(s.childClassName, p, E);
  return /* @__PURE__ */ t("th", { ...f, ref: N, ...l, className: C, children: /* @__PURE__ */ t("abbr", { ...h, className: y, children: i }) });
}, M = k(
  P,
  c({
    block: c.exclude,
    flags: (e) => +e
  })
);
export {
  M as default
};
