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