const e=require("../../style/index.js"),t=require("../../theme/util/genComponentStyleHook.js"),n=require("../../theme/util/statistic.js");var r=t=>{let{antCls:n,componentCls:r,cardHeadHeight:i,cardPaddingBase:a,cardHeadTabsMarginBottom:o}=t;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:i,marginBottom:-1,padding:`0 ${a}px`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG,background:`transparent`,borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorBorderSecondary}`,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,...e.clearFix(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...e.textEllipsis,[`
          > ${r}-typography,
          > ${r}-typography-edit-content
        `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${n}-tabs-top`]:{clear:`both`,marginBottom:o,color:t.colorText,fontWeight:`normal`,fontSize:t.fontSize,"&-bar":{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorBorderSecondary}`}}}},i=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:`
      ${i}px 0 0 0 ${n},
      0 ${i}px 0 0 ${n},
      ${i}px ${i}px 0 0 ${n},
      ${i}px 0 0 0 ${n} inset,
      0 ${i}px 0 0 ${n} inset;
    `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},a=t=>{let{componentCls:n,iconCls:r,cardActionsLiMargin:i,cardActionsIconSize:a,colorBorderSecondary:o}=t;return{margin:0,padding:0,listStyle:`none`,background:t.colorBgContainer,borderTop:`${t.lineWidth}px ${t.lineType} ${o}`,display:`flex`,borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px `,...e.clearFix(),"& > li":{margin:i,color:t.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:t.cardActionsIconSize*2,fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:`pointer`,"&:hover":{color:t.colorPrimary,transition:`color ${t.motionDurationMid}`},[`a:not(${n}-btn), > ${r}`]:{display:`inline-block`,width:`100%`,color:t.colorTextDescription,lineHeight:`${t.fontSize*t.lineHeight}px`,transition:`color ${t.motionDurationMid}`,"&:hover":{color:t.colorPrimary}},[`> ${r}`]:{fontSize:a,lineHeight:`${a*t.lineHeight}px`}},"&:not(:last-child)":{borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${o}`}}}},o=t=>({margin:`-${t.marginXXS}px 0`,display:`flex`,...e.clearFix(),"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG,...e.textEllipsis},"&-description":{color:t.colorTextDescription}}),s=e=>{let{componentCls:t,cardPaddingBase:n,colorFillAlter:r}=e;return{[`${t}-head`]:{padding:`0 ${n}px`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${e.padding}px ${n}px`}}},c=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},l=t=>{let{componentCls:n,cardShadow:l,cardHeadPadding:u,colorBorderSecondary:d,boxShadow:f,cardPaddingBase:p}=t;return{[n]:{...e.resetComponent(t),position:`relative`,background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${n}-bordered)`]:{boxShadow:f},[`${n}-head`]:r(t),[`${n}-extra`]:{marginInlineStart:`auto`,color:``,fontWeight:`normal`,fontSize:t.fontSize},[`${n}-body`]:{padding:p,borderRadius:` 0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,...e.clearFix()},[`${n}-grid`]:i(t),[`${n}-cover`]:{"> *":{display:`block`,width:`100%`},img:{borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`}},[`${n}-actions`]:a(t),[`${n}-meta`]:o(t)},[`${n}-bordered`]:{border:`${t.lineWidth}px ${t.lineType} ${d}`,[`${n}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${n}-hoverable`]:{cursor:`pointer`,transition:`box-shadow ${t.motionDurationMid}, border-color ${t.motionDurationMid}`,"&:hover":{borderColor:`transparent`,boxShadow:l}},[`${n}-contain-grid`]:{[`${n}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${n}-loading) ${n}-body`]:{marginBlockStart:-t.lineWidth,marginInlineStart:-t.lineWidth,padding:0}},[`${n}-contain-tabs`]:{[`> ${n}-head`]:{[`${n}-head-title, ${n}-extra`]:{paddingTop:u}}},[`${n}-type-inner`]:s(t),[`${n}-loading`]:c(t),[`${n}-rtl`]:{direction:`rtl`}}},u=e=>{let{componentCls:t,cardPaddingSM:n,cardHeadHeightSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:r,padding:`0 ${n}px`,fontSize:e.fontSize,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{minHeight:r,paddingTop:0,display:`flex`,alignItems:`center`}}}}},d=t.default(`Card`,e=>{let t=n.merge(e,{cardShadow:e.boxShadowCard,cardHeadHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,cardHeadHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardHeadTabsMarginBottom:-e.padding-e.lineWidth,cardActionsLiMargin:`${e.paddingSM}px 0`,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[l(t),u(t)]});exports.default=d;