const e=require("../../hooks/useMergeProps.js"),t=require("../../utils/uiUtil.js"),n=require("./YearBody.js"),r=require("./YearHeader.js");let i=require("vue");function a(a){let o=e.default(a),{prefixCls:s,operationRef:c,onViewDateChange:l,generateConfig:u,value:d,viewDate:f,sourceMode:p,onSelect:m,onPanelChange:h}=o,g=`${s}-year-panel`;c.value={onKeydown:e=>t.createKeydownHandler(e,{onLeftRight:e=>{m(u.addYear(d||f,e),`key`)},onCtrlLeftRight:e=>{m(u.addYear(d||f,e*10),`key`)},onUpDown:e=>{m(u.addYear(d||f,e*3),`key`)},onEnter:()=>{h(p===`date`?`date`:`month`,d||f)}})};let _=e=>{let t=u.addYear(f,e*10);l(t),h(null,t)};return(0,i.createVNode)(`div`,{class:g},[(0,i.createVNode)(r.default,{...o,prefixCls:s,onPrevDecade:()=>{_(-1)},onNextDecade:()=>{_(1)},onDecadeClick:()=>{h(`decade`,f)}},null),(0,i.createVNode)(n.default,{...o,prefixCls:s,onSelect:e=>{h(p===`date`?`date`:`month`,e),m(e,`mouse`)}},null)])}a.displayName=`YearPanel`,a.inheritAttrs=!1,exports.default=a;