"use client";
import { dateMatchModifiers as u } from "../utils/dateMatchModifiers.js";
import { getFocusableDate as g } from "./getFocusableDate.js";
import { CalendarDay as m } from "../classes/CalendarDay.js";
function h(t, i, a, s, c, e, n, d = 0) {
  if (d > 365)
    return;
  const o = g(t, i, a.date, s, c, e, n), l = !!(e.disabled && u(o, e.disabled, n)), r = !!(e.hidden && u(o, e.hidden, n)), D = o, f = new m(o, D, n);
  return !l && !r ? f : h(t, i, f, s, c, e, n, d + 1);
}
export {
  h as getNextFocus
};
