"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),C=require("../../PanelContext.js"),P=require("../../hooks/useMergeProps.js"),u=require("../../utils/dateUtil.js"),g=require("../Header.js");function a(i){const s=P.default(i),{prefixCls:o,generateConfig:t,locale:e,viewDate:n,onNextMonth:d,onPrevMonth:h,onNextYear:m,onPrevYear:f,onYearClick:p,onMonthClick:N}=s,{hideHeader:b}=C.useInjectPanel();if(b.value)return null;const x=`${o}-header`,y=e.shortMonths||(t.locale.getShortMonths?t.locale.getShortMonths(e.locale):[]),M=t.getMonth(n),l=r.createVNode("button",{type:"button",key:"year",onClick:p,tabindex:-1,class:`${o}-year-btn`},[u.formatValue(n,{locale:e,format:e.yearFormat,generateConfig:t})]),c=r.createVNode("button",{type:"button",key:"month",onClick:N,tabindex:-1,class:`${o}-month-btn`},[e.monthFormat?u.formatValue(n,{locale:e,format:e.monthFormat,generateConfig:t}):y[M]]),v=e.monthBeforeYear?[c,l]:[l,c];return r.createVNode(g.default,{...s,prefixCls:x,onSuperPrev:f,onPrev:h,onNext:d,onSuperNext:m},{default:()=>[v]})}a.displayName="DateHeader";a.inheritAttrs=!1;exports.default=a;
