import { jsx as p, jsxs as H } from "react/jsx-runtime";
import { g as L, c as j } from "./index.CfM2L_w0.js";
import { b as $, C as B, c as P } from "./Header.CH7cTbOc.js";
import { a as J } from "./index.CfQlFjZU.js";
import { l as W } from "./index.C1ZfizMq.js";
import { r as G, a as V, b as X, c as O } from "./isArrayLike.k2ujDjnO.js";
import { r as Z } from "./isSymbol.DZ_1fH0p.js";
const z = "creator_container_jfj96", K = "creator_datePickerMenuItem_Newa1", Q = "creator_datePickerMenuItemHidden_WZiHP", U = "creator_datePickerMenuItemActive_LFjER", ee = "creator_datePickerMenuItemDisabled_YxWYs", l = { container: z, datePickerMenuItem: K, datePickerMenuItemHidden: Q, datePickerMenuItemActive: U, datePickerMenuItemDisabled: ee };
var y, T;
function re() {
  if (T) return y;
  T = 1;
  var n = Math.ceil, e = Math.max;
  function o(r, t, i, s) {
    for (var c = -1, u = e(n((t - r) / (i || 1)), 0), a = Array(u); u--; )
      a[s ? u : ++c] = r, r += i;
    return a;
  }
  return y = o, y;
}
var M, D;
function te() {
  if (D) return M;
  D = 1;
  var n = G(), e = V(), o = X(), r = O();
  function t(i, s, c) {
    if (!r(c))
      return !1;
    var u = typeof s;
    return (u == "number" ? e(c) && o(s, c.length) : u == "string" && s in c) ? n(c[s], i) : !1;
  }
  return M = t, M;
}
var R, F;
function ne() {
  if (F) return R;
  F = 1;
  var n = /\s/;
  function e(o) {
    for (var r = o.length; r-- && n.test(o.charAt(r)); )
      ;
    return r;
  }
  return R = e, R;
}
var v, x;
function ae() {
  if (x) return v;
  x = 1;
  var n = ne(), e = /^\s+/;
  function o(r) {
    return r && r.slice(0, n(r) + 1).replace(e, "");
  }
  return v = o, v;
}
var q, S;
function ie() {
  if (S) return q;
  S = 1;
  var n = ae(), e = O(), o = Z(), r = NaN, t = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, s = /^0o[0-7]+$/i, c = parseInt;
  function u(a) {
    if (typeof a == "number")
      return a;
    if (o(a))
      return r;
    if (e(a)) {
      var d = typeof a.valueOf == "function" ? a.valueOf() : a;
      a = e(d) ? d + "" : d;
    }
    if (typeof a != "string")
      return a === 0 ? a : +a;
    a = n(a);
    var I = i.test(a);
    return I || s.test(a) ? c(a.slice(2), I ? 2 : 8) : t.test(a) ? r : +a;
  }
  return q = u, q;
}
var N, A;
function se() {
  if (A) return N;
  A = 1;
  var n = ie(), e = 1 / 0, o = 17976931348623157e292;
  function r(t) {
    if (!t)
      return t === 0 ? t : 0;
    if (t = n(t), t === e || t === -1 / 0) {
      var i = t < 0 ? -1 : 1;
      return i * o;
    }
    return t === t ? t : 0;
  }
  return N = r, N;
}
var Y, C;
function oe() {
  if (C) return Y;
  C = 1;
  var n = re(), e = te(), o = se();
  function r(t) {
    return function(i, s, c) {
      return c && typeof c != "number" && e(i, s, c) && (s = c = void 0), i = o(i), s === void 0 ? (s = i, i = 0) : s = o(s), c = c === void 0 ? i < s ? 1 : -1 : o(c), n(i, s, c, t);
    };
  }
  return Y = r, Y;
}
var k, E;
function ce() {
  if (E) return k;
  E = 1;
  var n = oe(), e = n();
  return k = e, k;
}
var ue = ce();
const w = /* @__PURE__ */ L(ue), me = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], fe = () => {
  const n = (/* @__PURE__ */ new Date()).getFullYear(), e = w(n, n + 11);
  return w(n - 1, n - 11, -1).reverse().concat(e).map((t) => `${t}`);
}, de = fe(), le = (n) => {
  const { mode: e, handleModeSelection: o, disablePastDates: r, disableFutureDates: t } = n, i = /* @__PURE__ */ new Date(), { currentMonth: s, goToMonth: c } = $(), u = (m, f) => {
    e === "years" ? c(P(new Date(+m, s.getMonth(), 1))) : e === "months" && c(P(new Date(s.getFullYear(), f, 1))), o("");
  }, a = (m, f) => {
    const g = new Date(s.getFullYear(), f, 1), h = Number(m), b = new Date(i.getFullYear(), i.getMonth(), 1), _ = i.getFullYear();
    return j(l.datePickerMenuItem, {
      [l.datePickerMenuItemDisabled]: r && e === "months" && g < b || t && e === "months" && g > b,
      [l.datePickerMenuItemHidden]: r && e === "years" && h < _ || t && e === "years" && h > _,
      [l.datePickerMenuItemActive]: e === "years" && h === _ || e === "months" && g === b
    });
  }, d = () => {
    switch (e) {
      case "months":
        return me;
      case "years":
        return de;
      default:
        return [];
    }
  }, I = (m, f) => /* @__PURE__ */ p(
    "div",
    {
      className: a(m, f),
      onClick: () => u(m, f),
      children: m
    },
    f
  );
  return {
    currentMonth: s,
    data: d(),
    dataLayout: I,
    ...n
  };
}, Ie = ({
  currentMonth: n,
  data: e,
  disablePastDates: o,
  disableFutureDates: r,
  dataLayout: t,
  handleModeSelection: i
}) => /* @__PURE__ */ H("div", { className: l.container, children: [
  /* @__PURE__ */ p(
    B,
    {
      displayMonth: n,
      disablePastDates: o,
      disableFutureDates: r,
      handleModeSelection: i
    }
  ),
  /* @__PURE__ */ p(W, { values: e, layout: t })
] }), ve = J(Ie, le);
export {
  ve as R
};
