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