import e from"../../_util/classNames.mjs";import{useInjectPanel as t}from"../PanelContext.mjs";import n from"../hooks/useMergeProps.mjs";import{getLastDay as r}from"../utils/timeUtil.mjs";import{getCellDateDisabled as i}from"../utils/dateUtil.mjs";import{createVNode as a}from"vue";function o(o){let{prefixCls:s,disabledDate:c,onSelect:l,picker:u,rowNum:d,colNum:f,prefixColumn:p,rowClassName:m,baseDate:h,getCellClassName:g,getCellText:_,getCellNode:v,getCellDate:y,generateConfig:b,titleCell:x,headerCells:S}=n(o),{onDateMouseenter:C,onDateMouseleave:w,mode:T}=t(),E=`${s}-cell`,D=[];for(let t=0;t<d;t+=1){let n=[],o;for(let s=0;s<f;s+=1){let d=y(h,t*f+s),m=i({cellDate:d,mode:T.value,disabledDate:c,generateConfig:b});s===0&&(o=d,p&&n.push(p(o)));let S=x&&x(d);n.push(a(`td`,{key:s,title:S,class:e(E,{[`${E}-disabled`]:m,[`${E}-start`]:_(d)===1||u===`year`&&Number(S)%10==0,[`${E}-end`]:S===r(b,d)||u===`year`&&Number(S)%10==9,...g(d)}),onClick:e=>{e.stopPropagation(),m||l(d)},onMouseenter:()=>{!m&&C&&C(d)},onMouseleave:()=>{!m&&w&&w(d)}},[v?v(d):a(`div`,{class:`${E}-inner`},[_(d)])]))}D.push(a(`tr`,{key:t,class:m&&m(o)},[n]))}return a(`div`,{class:`${s}-body`},[a(`table`,{class:`${s}-content`},[S&&a(`thead`,null,[a(`tr`,null,[S])]),a(`tbody`,null,[D])])])}o.displayName=`PanelBody`,o.inheritAttrs=!1;export{o as default};