const e=require("../../RangeContext.js"),t=require("../../hooks/useMergeProps.js"),n=require("../PanelBody.js"),r=require("../../utils/dateUtil.js"),i=require("../../hooks/useCellClassName.js");let a=require("vue");function o(o){let s=t.default(o),{prefixCls:c,generateConfig:l,prefixColumn:u,locale:d,rowCount:f,viewDate:p,value:m,dateRender:h}=s,{rangedValue:g,hoverRangedValue:_}=e.useInjectRange(),v=r.getWeekStartDate(d.locale,l,p),y=`${c}-cell`,b=l.locale.getWeekFirstDay(d.locale),x=l.getNow(),S=[],C=d.shortWeekDays||(l.locale.getShortWeekDays?l.locale.getShortWeekDays(d.locale):[]);u&&S.push((0,a.createVNode)(`th`,{key:`empty`,"aria-label":`empty cell`},null));for(let e=0;e<7;e+=1)S.push((0,a.createVNode)(`th`,{key:e},[C[(e+b)%7]]));let w=i.default({cellPrefixCls:y,today:x,value:m,generateConfig:l,rangedValue:u?null:g.value,hoverRangedValue:u?null:_.value,isSameCell:(e,t)=>r.isSameDate(l,e,t),isInView:e=>r.isSameMonth(l,e,p),offsetCell:(e,t)=>l.addDate(e,t)}),T=h?e=>h({current:e,today:x}):void 0;return(0,a.createVNode)(n.default,{...s,rowNum:f,colNum:7,baseDate:v,getCellNode:T,getCellText:l.getDate,getCellClassName:w,getCellDate:l.addDate,titleCell:e=>r.formatValue(e,{locale:d,format:`YYYY-MM-DD`,generateConfig:l}),headerCells:S},null)}o.displayName=`DateBody`,o.inheritAttrs=!1,o.props=[`prefixCls`,`generateConfig`,`value?`,`viewDate`,`locale`,`rowCount`,`onSelect`,`dateRender?`,`disabledDate?`,`prefixColumn?`,`rowClassName?`],exports.default=o;