"use client";
function S(d, a, k, t, f, O, n) {
  const { ISOWeek: o, broadcastCalendar: r } = O, { addDays: c, addMonths: W, addWeeks: l, addYears: u, endOfBroadcastWeek: b, endOfISOWeek: m, endOfWeek: y, max: F, min: I, startOfBroadcastWeek: h, startOfISOWeek: i, startOfWeek: x } = n;
  let s = {
    day: c,
    week: l,
    month: W,
    year: u,
    startOfWeek: (e) => r ? h(e, n) : o ? i(e) : x(e),
    endOfWeek: (e) => r ? b(e) : o ? m(e) : y(e)
  }[d](k, a === "after" ? 1 : -1);
  return a === "before" && t ? s = F([t, s]) : a === "after" && f && (s = I([f, s])), s;
}
export {
  S as getFocusableDate
};
