"use client";
function w(n, r) {
  let { startMonth: t, endMonth: e } = n;
  const { startOfYear: y, startOfDay: i, startOfMonth: M, endOfMonth: l, addYears: Y, endOfYear: u, newDate: f, today: d } = r, { fromYear: o, toYear: a, fromMonth: s, toMonth: h } = n;
  !t && s && (t = s), !t && o && (t = r.newDate(o, 0, 1)), !e && h && (e = h), !e && a && (e = f(a, 11, 31));
  const c = n.captionLayout === "dropdown" || n.captionLayout === "dropdown-years";
  return t ? t = M(t) : o ? t = f(o, 0, 1) : !t && c && (t = y(Y(n.today ?? d(), -100))), e ? e = l(e) : a ? e = f(a, 11, 31) : !e && c && (e = u(n.today ?? d())), [
    t && i(t),
    e && i(e)
  ];
}
export {
  w as getNavMonths
};
