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