"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue"),g=require("../../hooks/useMergeProps.js"),y=require("../../utils/uiUtil.js"),C=require("./DecadeBody.js"),A=require("./DecadeHeader.js"),r=10,i=r*10;function u(f){const l=g.default(f),{prefixCls:d,onViewDateChange:E,generateConfig:t,viewDate:a,operationRef:p,onSelect:o,onPanelChange:s}=l,N=`${d}-decade-panel`;p.value={onKeydown:n=>y.createKeydownHandler(n,{onLeftRight:e=>{o(t.addYear(a,e*r),"key")},onCtrlLeftRight:e=>{o(t.addYear(a,e*i),"key")},onUpDown:e=>{o(t.addYear(a,e*r*C.DECADE_COL_COUNT),"key")},onEnter:()=>{s("year",a)}})};const D=n=>{const e=t.addYear(a,n*i);E(e),s(null,e)},_=n=>{o(n,"mouse"),s("year",n)};return c.createVNode("div",{class:N},[c.createVNode(A.default,{...l,prefixCls:d,onPrevDecades:()=>{D(-1)},onNextDecades:()=>{D(1)}},null),c.createVNode(C.default,{...l,prefixCls:d,onSelect:_},null)])}u.displayName="DecadePanel";u.inheritAttrs=!1;exports.DECADE_DISTANCE_COUNT=i;exports.DECADE_UNIT_DIFF=r;exports.default=u;
