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