import{resetComponent as e,textEllipsis as t}from"../../style/index.mjs";import n from"../../theme/util/genComponentStyleHook.mjs";import{merge as r}from"../../theme/util/statistic.mjs";var i=e=>{let{componentCls:t,descriptionsSmallPadding:n,descriptionsDefaultPadding:r,descriptionsMiddlePadding:i,descriptionsBg:a}=e;return{[`&${t}-bordered`]:{[`${t}-view`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`,borderCollapse:`collapse`}},[`${t}-item-label, ${t}-item-content`]:{padding:r,borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`${t}-item-label`]:{backgroundColor:a,"&::after":{display:`none`}},[`${t}-row`]:{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:`none`}},[`&${t}-middle`]:{[`${t}-item-label, ${t}-item-content`]:{padding:i}},[`&${t}-small`]:{[`${t}-item-label, ${t}-item-content`]:{padding:n}}}}},a=n=>{let{componentCls:r,descriptionsExtraColor:a,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:s,descriptionsItemLabelColonMarginLeft:c,descriptionsTitleMarginBottom:l}=n;return{[r]:{...e(n),...i(n),"&-rtl":{direction:`rtl`},[`${r}-header`]:{display:`flex`,alignItems:`center`,marginBottom:l},[`${r}-title`]:{...t,flex:`auto`,color:n.colorText,fontWeight:n.fontWeightStrong,fontSize:n.fontSizeLG,lineHeight:n.lineHeightLG},[`${r}-extra`]:{marginInlineStart:`auto`,color:a,fontSize:n.fontSize},[`${r}-view`]:{width:`100%`,borderRadius:n.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`}},[`${r}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:`none`}},[`${r}-item-label`]:{color:n.colorText,fontWeight:`normal`,fontSize:n.fontSize,lineHeight:n.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${c}px ${s}px`},[`&${r}-item-no-colon::after`]:{content:`""`}},[`${r}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${r}-item-content`]:{display:`table-cell`,flex:1,color:n.colorText,fontSize:n.fontSize,lineHeight:n.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${r}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${r}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${r}-item-content`]:{display:`inline-flex`,alignItems:`baseline`}}},"&-middle":{[`${r}-row`]:{"> th, > td":{paddingBottom:n.paddingSM}}},"&-small":{[`${r}-row`]:{"> th, > td":{paddingBottom:n.paddingXS}}}}}},o=n(`Descriptions`,e=>{let t=e.colorFillAlter,n=e.fontSizeSM*e.lineHeightSM,i=e.colorText,o=`${e.paddingXS}px ${e.padding}px`,s=`${e.padding}px ${e.paddingLG}px`,c=`${e.paddingSM}px ${e.paddingLG}px`,l=e.padding,u=e.marginXS;return[a(r(e,{descriptionsBg:t,descriptionsTitleMarginBottom:n,descriptionsExtraColor:i,descriptionItemPaddingBottom:l,descriptionsSmallPadding:o,descriptionsDefaultPadding:s,descriptionsMiddlePadding:c,descriptionsItemLabelColonMarginRight:u,descriptionsItemLabelColonMarginLeft:e.marginXXS/2}))]});export{o as default};