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