"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue"),M=require("../../hooks/useMergeProps.js"),y=require("../../utils/uiUtil.js"),f=require("./MonthBody.js"),v=require("./MonthHeader.js");function u(h){const i=M.default(h),{prefixCls:s,operationRef:p,onViewDateChange:C,generateConfig:o,value:a,viewDate:n,onPanelChange:r,onSelect:l}=i,g=`${s}-month-panel`;p.value={onKeydown:t=>y.createKeydownHandler(t,{onLeftRight:e=>{l(o.addMonth(a||n,e),"key")},onCtrlLeftRight:e=>{l(o.addYear(a||n,e),"key")},onUpDown:e=>{l(o.addMonth(a||n,e*f.MONTH_COL_COUNT),"key")},onEnter:()=>{r("date",a||n)}})};const c=t=>{const e=o.addYear(n,t);C(e),r(null,e)};return d.createVNode("div",{class:g},[d.createVNode(v.default,{...i,prefixCls:s,onPrevYear:()=>{c(-1)},onNextYear:()=>{c(1)},onYearClick:()=>{r("year",n)}},null),d.createVNode(f.default,{...i,prefixCls:s,onSelect:t=>{l(t,"mouse"),r("date",t)}},null)])}u.displayName="MonthPanel";u.inheritAttrs=!1;exports.default=u;
