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