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