import { j as t } from "../../../../_virtual/jsx-runtime.js";
import { useState as i } from "react";
import { Content as d, CalendarsWrapper as x } from "../../../DatePicker/styles.js";
import { Header as C } from "../../../DatePicker/components/header/index.js";
import { Calendar as M } from "../../../DatePicker/components/calendar/index.js";
import { getCurrentMonth as g, JS_MONTHS as m } from "../../../DatePicker/utils.js";
import { getNextMonth as j } from "../../../DatePicker/components/calendar/utils.js";
import { Wrapper as w } from "./styles.js";
function R({
  date: o = { start: /* @__PURE__ */ new Date(), end: /* @__PURE__ */ new Date() },
  locale: s = "en_CA",
  startingDay: h = "sunday",
  maxDate: l,
  minDate: c
}) {
  const [r, a] = i(o.start.getFullYear()), [e, n] = i(
    g(/* @__PURE__ */ new Date(), o)
  ), u = j(e);
  function f() {
    e === m.December ? (n(0), a(r + 1)) : n(e + 1);
  }
  function p() {
    e <= m.January ? (a(r - 1), n(11)) : n(e - 1);
  }
  return /* @__PURE__ */ t.jsx(w, { children: /* @__PURE__ */ t.jsxs(d, { children: [
    /* @__PURE__ */ t.jsx(
      C,
      {
        selection: "single-date",
        currentMonth: e,
        nextMonth: u,
        currentYear: r,
        months: 1,
        locale: s,
        handleNextMonth: f,
        handlePrevMonth: p
      }
    ),
    /* @__PURE__ */ t.jsx(x, { children: /* @__PURE__ */ t.jsx(
      M,
      {
        showSelectors: !1,
        selection: "range",
        selectedRange: o,
        month: e,
        year: r,
        startingDay: h,
        locale: s,
        handleChange: () => {
        },
        minDate: c,
        maxDate: l,
        visible: !0
      }
    ) })
  ] }) });
}
export {
  R as CalendarView
};
