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