import{clearFix as e,resetComponent as t,textEllipsis as n}from"../../style/index.mjs";import r from"../../theme/util/genComponentStyleHook.mjs";import{merge as i}from"../../theme/util/statistic.mjs";var a=t=>{let{antCls:r,componentCls:i,cardHeadHeight:a,cardPaddingBase:o,cardHeadTabsMarginBottom:s}=t;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:a,marginBottom:-1,padding:`0 ${o}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(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,...n,[`
          > ${i}-typography,
          > ${i}-typography-edit-content
        `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${r}-tabs-top`]:{clear:`both`,marginBottom:s,color:t.colorText,fontWeight:`normal`,fontSize:t.fontSize,"&-bar":{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorBorderSecondary}`}}}},o=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}}},s=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(),"& > 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}`}}}},c=t=>({margin:`-${t.marginXXS}px 0`,display:`flex`,...e(),"&-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,...n},"&-description":{color:t.colorTextDescription}}),l=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`}}},u=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},d=n=>{let{componentCls:r,cardShadow:i,cardHeadPadding:d,colorBorderSecondary:f,boxShadow:p,cardPaddingBase:m}=n;return{[r]:{...t(n),position:`relative`,background:n.colorBgContainer,borderRadius:n.borderRadiusLG,[`&:not(${r}-bordered)`]:{boxShadow:p},[`${r}-head`]:a(n),[`${r}-extra`]:{marginInlineStart:`auto`,color:``,fontWeight:`normal`,fontSize:n.fontSize},[`${r}-body`]:{padding:m,borderRadius:` 0 0 ${n.borderRadiusLG}px ${n.borderRadiusLG}px`,...e()},[`${r}-grid`]:o(n),[`${r}-cover`]:{"> *":{display:`block`,width:`100%`},img:{borderRadius:`${n.borderRadiusLG}px ${n.borderRadiusLG}px 0 0`}},[`${r}-actions`]:s(n),[`${r}-meta`]:c(n)},[`${r}-bordered`]:{border:`${n.lineWidth}px ${n.lineType} ${f}`,[`${r}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${r}-hoverable`]:{cursor:`pointer`,transition:`box-shadow ${n.motionDurationMid}, border-color ${n.motionDurationMid}`,"&:hover":{borderColor:`transparent`,boxShadow:i}},[`${r}-contain-grid`]:{[`${r}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${r}-loading) ${r}-body`]:{marginBlockStart:-n.lineWidth,marginInlineStart:-n.lineWidth,padding:0}},[`${r}-contain-tabs`]:{[`> ${r}-head`]:{[`${r}-head-title, ${r}-extra`]:{paddingTop:d}}},[`${r}-type-inner`]:l(n),[`${r}-loading`]:u(n),[`${r}-rtl`]:{direction:`rtl`}}},f=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`}}}}},p=r(`Card`,e=>{let t=i(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[d(t),f(t)]});export{p as default};