const e=require("../../RangeContext.js"),t=require("../../hooks/useMergeProps.js"),n=require("../PanelBody.js"),r=require("../../utils/dateUtil.js"),i=require("../../hooks/useCellClassName.js");let a=require("vue");var o=4;function s(s){let c=t.default(s),{prefixCls:l,value:u,viewDate:d,locale:f,generateConfig:p}=c,{rangedValue:m,hoverRangedValue:h}=e.useInjectRange(),g=`${l}-cell`,_=p.getYear(d),v=Math.floor(_/10)*10,y=v+10-1,b=p.setYear(d,v-Math.ceil((3*o-10)/2)),x=i.default({cellPrefixCls:g,value:u,generateConfig:p,rangedValue:m.value,hoverRangedValue:h.value,isSameCell:(e,t)=>r.isSameYear(p,e,t),isInView:e=>{let t=p.getYear(e);return v<=t&&t<=y},offsetCell:(e,t)=>p.addYear(e,t)});return(0,a.createVNode)(n.default,{...c,rowNum:o,colNum:3,baseDate:b,getCellText:p.getYear,getCellClassName:x,getCellDate:p.addYear,titleCell:e=>r.formatValue(e,{locale:f,format:`YYYY`,generateConfig:p})},null)}s.displayName=`YearBody`,s.inheritAttrs=!1,exports.default=s;