import{initPickerPanelToken as l,genPanelStyle as n}from"../../date-picker/style/index.mjs";import{initInputToken as o}from"../../input/style/index.mjs";import{resetComponent as g}from"../../style/index.mjs";import"../../theme/internal.mjs";import c from"../../theme/util/genComponentStyleHook.mjs";import{merge as p}from"../../theme/util/statistic.mjs";const h=e=>{const{calendarCls:i,componentCls:a,calendarFullBg:d,calendarFullPanelBg:t,calendarItemActiveBg:r}=e;return{[i]:{...n(e),...g(e),background:d,"&-rtl":{direction:"rtl"},[`${i}-header`]:{display:"flex",justifyContent:"flex-end",padding:`${e.paddingSM}px 0`,[`${i}-year-select`]:{minWidth:e.yearControlWidth},[`${i}-month-select`]:{minWidth:e.monthControlWidth,marginInlineStart:e.marginXS},[`${i}-mode-switch`]:{marginInlineStart:e.marginXS}}},[`${i} ${a}-panel`]:{background:t,border:0,borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,[`${a}-month-panel, ${a}-date-panel`]:{width:"auto"},[`${a}-body`]:{padding:`${e.paddingXS}px 0`},[`${a}-content`]:{width:"100%"}},[`${i}-mini`]:{borderRadius:e.borderRadiusLG,[`${i}-header`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS},[`${a}-panel`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${a}-content`]:{height:e.miniContentHeight,th:{height:"auto",padding:0,lineHeight:`${e.weekHeight}px`}},[`${a}-cell::before`]:{pointerEvents:"none"}},[`${i}${i}-full`]:{[`${a}-panel`]:{display:"block",width:"100%",textAlign:"end",background:d,border:0,[`${a}-body`]:{"th, td":{padding:0},th:{height:"auto",paddingInlineEnd:e.paddingSM,paddingBottom:e.paddingXXS,lineHeight:`${e.weekHeight}px`}}},[`${a}-cell`]:{"&::before":{display:"none"},"&:hover":{[`${i}-date`]:{background:e.controlItemBgHover}},[`${i}-date-today::before`]:{display:"none"},[`&-in-view${a}-cell-selected`]:{[`${i}-date, ${i}-date-today`]:{background:r}},"&-selected, &-selected:hover":{[`${i}-date, ${i}-date-today`]:{[`${i}-date-value`]:{color:e.colorPrimary}}}},[`${i}-date`]:{display:"block",width:"auto",height:"auto",margin:`0 ${e.marginXS/2}px`,padding:`${e.paddingXS/2}px ${e.paddingXS}px 0`,border:0,borderTop:`${e.lineWidthBold}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,transition:`background ${e.motionDurationSlow}`,"&-value":{lineHeight:`${e.dateValueHeight}px`,transition:`color ${e.motionDurationSlow}`},"&-content":{position:"static",width:"auto",height:e.dateContentHeight,overflowY:"auto",color:e.colorText,lineHeight:e.lineHeight,textAlign:"start"},"&-today":{borderColor:e.colorPrimary,[`${i}-date-value`]:{color:e.colorText}}}},[`@media only screen and (max-width: ${e.screenXS}px) `]:{[`${i}`]:{[`${i}-header`]:{display:"block",[`${i}-year-select`]:{width:"50%"},[`${i}-month-select`]:{width:`calc(50% - ${e.paddingXS}px)`},[`${i}-mode-switch`]:{width:"100%",marginTop:e.marginXS,marginInlineStart:0,"> label":{width:"50%",textAlign:"center"}}}}}}},y=c("Calendar",e=>{const i=`${e.componentCls}-calendar`,a=p(o(e),l(e),{calendarCls:i,pickerCellInnerCls:`${e.componentCls}-cell-inner`,calendarFullBg:e.colorBgContainer,calendarFullPanelBg:e.colorBgContainer,calendarItemActiveBg:e.controlItemBgActive,dateValueHeight:e.controlHeightSM,weekHeight:e.controlHeightSM*.75,dateContentHeight:(e.fontSizeSM*e.lineHeightSM+e.marginXS)*3+e.lineWidth*2});return[h(a)]},{yearControlWidth:80,monthControlWidth:70,miniContentHeight:256});export{y as default,h as genCalendarStyles};
