import e from"../../hooks/useMergeProps.mjs";import{createKeydownHandler as t}from"../../utils/uiUtil.mjs";import n from"./DecadeBody.mjs";import r from"./DecadeHeader.mjs";import{createVNode as i}from"vue";function a(a){let o=e(a),{prefixCls:s,onViewDateChange:c,generateConfig:l,viewDate:u,operationRef:d,onSelect:f,onPanelChange:p}=o,m=`${s}-decade-panel`;d.value={onKeydown:e=>t(e,{onLeftRight:e=>{f(l.addYear(u,e*10),`key`)},onCtrlLeftRight:e=>{f(l.addYear(u,e*100),`key`)},onUpDown:e=>{f(l.addYear(u,e*10*3),`key`)},onEnter:()=>{p(`year`,u)}})};let h=e=>{let t=l.addYear(u,e*100);c(t),p(null,t)},g=e=>{f(e,`mouse`),p(`year`,e)};return i(`div`,{class:m},[i(r,{...o,prefixCls:s,onPrevDecades:()=>{h(-1)},onNextDecades:()=>{h(1)}},null),i(n,{...o,prefixCls:s,onSelect:g},null)])}a.displayName=`DecadePanel`,a.inheritAttrs=!1;export{a as default};