import v from "../../../../@babel/runtime/helpers/esm/extends.mjs";
import * as a from "react";
import D from "../Header.mjs";
import { YEAR_DECADE_COUNT as r } from "./constant.mjs";
import s from "../../PanelContext.mjs";
function P(e) {
  var t = e.prefixCls, o = e.generateConfig, c = e.viewDate, i = e.onPrevDecade, d = e.onNextDecade, f = e.onDecadeClick, l = a.useContext(s), m = l.hideHeader;
  if (m)
    return null;
  var C = "".concat(t, "-header"), u = o.getYear(c), n = Math.floor(u / r) * r, x = n + r - 1;
  return /* @__PURE__ */ a.createElement(D, v({}, e, {
    prefixCls: C,
    onSuperPrev: i,
    onSuperNext: d
  }), /* @__PURE__ */ a.createElement("button", {
    type: "button",
    onClick: f,
    className: "".concat(t, "-decade-btn")
  }, n, "-", x));
}
export {
  P as default
};
