import u from "../../../../@babel/runtime/helpers/esm/extends.mjs";
import * as t from "react";
import x from "../Header.mjs";
import d from "../../PanelContext.mjs";
import { formatValue as v } from "../../utils/dateUtil.mjs";
function s(e) {
  var r = e.prefixCls, n = e.generateConfig, a = e.locale, o = e.viewDate, i = e.onNextYear, l = e.onPrevYear, f = e.onYearClick, c = t.useContext(d), m = c.hideHeader;
  if (m)
    return null;
  var C = "".concat(r, "-header");
  return /* @__PURE__ */ t.createElement(x, u({}, e, {
    prefixCls: C,
    onSuperPrev: l,
    onSuperNext: i
  }), /* @__PURE__ */ t.createElement("button", {
    type: "button",
    onClick: f,
    className: "".concat(r, "-year-btn")
  }, v(o, {
    locale: a,
    format: a.yearFormat,
    generateConfig: n
  })));
}
export {
  s as default
};
