import{createVNode as N}from"vue";import{useInjectRange as p}from"../../RangeContext.mjs";import V from"../../hooks/useCellClassName.mjs";import v from"../../hooks/useMergeProps.mjs";import{isSameMonth as O,formatValue as r}from"../../utils/dateUtil.mjs";import R from"../PanelBody.mjs";const T=3,x=4;function s(m){const a=v(m),{prefixCls:c,locale:o,value:h,viewDate:C,generateConfig:e,monthCellRender:n}=a,{rangedValue:i,hoverRangedValue:u}=p(),d=`${c}-cell`,f=V({cellPrefixCls:d,value:h,generateConfig:e,rangedValue:i.value,hoverRangedValue:u.value,isSameCell:(t,l)=>O(e,t,l),isInView:()=>!0,offsetCell:(t,l)=>e.addMonth(t,l)}),g=o.shortMonths||(e.locale.getShortMonths?e.locale.getShortMonths(o.locale):[]),M=e.setMonth(C,0);return N(R,{...a,rowNum:x,colNum:T,baseDate:M,getCellNode:n?t=>n({current:t,locale:o}):void 0,getCellText:t=>o.monthFormat?r(t,{locale:o,format:o.monthFormat,generateConfig:e}):g[e.getMonth(t)],getCellClassName:f,getCellDate:e.addMonth,titleCell:t=>r(t,{locale:o,format:"YYYY-MM",generateConfig:e})},null)}s.displayName="MonthBody";s.inheritAttrs=!1;export{T as MONTH_COL_COUNT,s as default};
