const e=require("../../../_util/classNames.js"),t=require("../../hooks/useMergeProps.js"),n=require("../../utils/uiUtil.js"),r=require("./DateBody.js"),i=require("./DateHeader.js");let a=require("vue");var o=6;function s(s){let c=t.default(s),{prefixCls:l,panelName:u=`date`,keyboardConfig:d,active:f,operationRef:p,generateConfig:m,value:h,viewDate:g,onViewDateChange:_,onPanelChange:v,onSelect:y}=c,b=`${l}-${u}-panel`;p.value={onKeydown:e=>n.createKeydownHandler(e,{onLeftRight:e=>{y(m.addDate(h||g,e),`key`)},onCtrlLeftRight:e=>{y(m.addYear(h||g,e),`key`)},onUpDown:e=>{y(m.addDate(h||g,e*7),`key`)},onPageUpDown:e=>{y(m.addMonth(h||g,e),`key`)},...d})};let x=e=>{let t=m.addYear(g,e);_(t),v(null,t)},S=e=>{let t=m.addMonth(g,e);_(t),v(null,t)};return(0,a.createVNode)(`div`,{class:e.default(b,{[`${b}-active`]:f})},[(0,a.createVNode)(i.default,{...c,prefixCls:l,value:h,viewDate:g,onPrevYear:()=>{x(-1)},onNextYear:()=>{x(1)},onPrevMonth:()=>{S(-1)},onNextMonth:()=>{S(1)},onMonthClick:()=>{v(`month`,g)},onYearClick:()=>{v(`year`,g)}},null),(0,a.createVNode)(r.default,{...c,onSelect:e=>y(e,`mouse`),prefixCls:l,value:h,viewDate:g,rowCount:o},null)])}s.displayName=`DatePanel`,s.inheritAttrs=!1,exports.default=s;