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