"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../date-picker/style/index.js"),o=require("../../input/style/index.js"),c=require("../../style/index.js");require("../../theme/internal.js");const g=require("../../theme/util/genComponentStyleHook.js"),h=require("../../theme/util/statistic.js"),r=e=>{const{calendarCls:i,componentCls:d,calendarFullBg:a,calendarFullPanelBg:n,calendarItemActiveBg:l}=e;return{[i]:{...t.genPanelStyle(e),...c.resetComponent(e),background:a,"&-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} ${d}-panel`]:{background:n,border:0,borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,[`${d}-month-panel, ${d}-date-panel`]:{width:"auto"},[`${d}-body`]:{padding:`${e.paddingXS}px 0`},[`${d}-content`]:{width:"100%"}},[`${i}-mini`]:{borderRadius:e.borderRadiusLG,[`${i}-header`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS},[`${d}-panel`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${d}-content`]:{height:e.miniContentHeight,th:{height:"auto",padding:0,lineHeight:`${e.weekHeight}px`}},[`${d}-cell::before`]:{pointerEvents:"none"}},[`${i}${i}-full`]:{[`${d}-panel`]:{display:"block",width:"100%",textAlign:"end",background:a,border:0,[`${d}-body`]:{"th, td":{padding:0},th:{height:"auto",paddingInlineEnd:e.paddingSM,paddingBottom:e.paddingXXS,lineHeight:`${e.weekHeight}px`}}},[`${d}-cell`]:{"&::before":{display:"none"},"&:hover":{[`${i}-date`]:{background:e.controlItemBgHover}},[`${i}-date-today::before`]:{display:"none"},[`&-in-view${d}-cell-selected`]:{[`${i}-date, ${i}-date-today`]:{background:l}},"&-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"}}}}}}},p=g.default("Calendar",e=>{const i=`${e.componentCls}-calendar`,d=h.merge(o.initInputToken(e),t.initPickerPanelToken(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[r(d)]},{yearControlWidth:80,monthControlWidth:70,miniContentHeight:256});exports.default=p;exports.genCalendarStyles=r;
