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