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