import{createVNode as a,createTextVNode as x}from"vue";import{YEAR_DECADE_COUNT as e}from"./index.mjs";import{useInjectPanel as N}from"../../PanelContext.mjs";import D from"../../hooks/useMergeProps.mjs";import Y from"../Header.mjs";function n(s){const r=D(s),{prefixCls:t,generateConfig:c,viewDate:d,onPrevDecade:i,onNextDecade:f,onDecadeClick:l}=r,{hideHeader:p}=N();if(p.value)return null;const u=`${t}-header`,m=c.getYear(d),o=Math.floor(m/e)*e,C=o+e-1;return a(Y,{...r,prefixCls:u,onSuperPrev:i,onSuperNext:f},{default:()=>[a("button",{type:"button",onClick:l,class:`${t}-decade-btn`},[o,x("-"),C])]})}n.displayName="YearHeader";n.inheritAttrs=!1;export{n as default};
