"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue"),y=require("../../../_util/classNames.js"),N=require("../../hooks/useMergeProps.js"),M=require("../../utils/dateUtil.js"),P=require("../../utils/uiUtil.js"),k=require("./DateBody.js"),q=require("./DateHeader.js"),Y=6;function u(v){const i=N.default(v),{prefixCls:s,panelName:h="date",keyboardConfig:p,active:g,operationRef:w,generateConfig:a,value:o,viewDate:t,onViewDateChange:c,onPanelChange:l,onSelect:r}=i,f=`${s}-${h}-panel`;w.value={onKeydown:n=>P.createKeydownHandler(n,{onLeftRight:e=>{r(a.addDate(o||t,e),"key")},onCtrlLeftRight:e=>{r(a.addYear(o||t,e),"key")},onUpDown:e=>{r(a.addDate(o||t,e*M.WEEK_DAY_COUNT),"key")},onPageUpDown:e=>{r(a.addMonth(o||t,e),"key")},...p})};const C=n=>{const e=a.addYear(t,n);c(e),l(null,e)},D=n=>{const e=a.addMonth(t,n);c(e),l(null,e)};return d.createVNode("div",{class:y.default(f,{[`${f}-active`]:g})},[d.createVNode(q.default,{...i,prefixCls:s,value:o,viewDate:t,onPrevYear:()=>{C(-1)},onNextYear:()=>{C(1)},onPrevMonth:()=>{D(-1)},onNextMonth:()=>{D(1)},onMonthClick:()=>{l("month",t)},onYearClick:()=>{l("year",t)}},null),d.createVNode(k.default,{...i,onSelect:n=>r(n,"mouse"),prefixCls:s,value:o,viewDate:t,rowCount:Y},null)])}u.displayName="DatePanel";u.inheritAttrs=!1;exports.default=u;
