"use client";
import n, { useCallback as u } from "react";
import { UI as i } from "../UI.js";
import { useDayPicker as v } from "../useDayPicker.js";
function x(c) {
  const { onPreviousClick: r, onNextClick: s, previousMonth: e, nextMonth: t, ...d } = c, { components: a, classNames: o, labels: { labelPrevious: m, labelNext: b } } = v(), f = u((l) => {
    t && s?.(l);
  }, [t, s]), h = u((l) => {
    e && r?.(l);
  }, [e, r]);
  return n.createElement(
    "nav",
    { ...d },
    n.createElement(
      a.PreviousMonthButton,
      { type: "button", className: o[i.PreviousMonthButton], tabIndex: e ? void 0 : -1, "aria-disabled": e ? void 0 : !0, "aria-label": m(e), onClick: h },
      n.createElement(a.Chevron, { disabled: e ? void 0 : !0, className: o[i.Chevron], orientation: "left" })
    ),
    n.createElement(
      a.NextMonthButton,
      { type: "button", className: o[i.NextMonthButton], tabIndex: t ? void 0 : -1, "aria-disabled": t ? void 0 : !0, "aria-label": b(t), onClick: f },
      n.createElement(a.Chevron, { disabled: t ? void 0 : !0, orientation: "right", className: o[i.Chevron] })
    )
  );
}
export {
  x as Nav
};
