"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../../style/index.js");require("../../theme/internal.js");const g=require("../../theme/util/genComponentStyleHook.js"),m=require("../../theme/util/statistic.js"),$=i=>{const{componentCls:e,descriptionsSmallPadding:t,descriptionsDefaultPadding:o,descriptionsMiddlePadding:n,descriptionsBg:l}=i;return{[`&${e}-bordered`]:{[`${e}-view`]:{border:`${i.lineWidth}px ${i.lineType} ${i.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${e}-item-label, ${e}-item-content`]:{padding:o,borderInlineEnd:`${i.lineWidth}px ${i.lineType} ${i.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${e}-item-label`]:{backgroundColor:l,"&::after":{display:"none"}},[`${e}-row`]:{borderBottom:`${i.lineWidth}px ${i.lineType} ${i.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${e}-middle`]:{[`${e}-item-label, ${e}-item-content`]:{padding:n}},[`&${e}-small`]:{[`${e}-item-label, ${e}-item-content`]:{padding:t}}}}},b=i=>{const{componentCls:e,descriptionsExtraColor:t,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:n,descriptionsItemLabelColonMarginLeft:l,descriptionsTitleMarginBottom:r}=i;return{[e]:{...d.resetComponent(i),...$(i),"&-rtl":{direction:"rtl"},[`${e}-header`]:{display:"flex",alignItems:"center",marginBottom:r},[`${e}-title`]:{...d.textEllipsis,flex:"auto",color:i.colorText,fontWeight:i.fontWeightStrong,fontSize:i.fontSizeLG,lineHeight:i.lineHeightLG},[`${e}-extra`]:{marginInlineStart:"auto",color:t,fontSize:i.fontSize},[`${e}-view`]:{width:"100%",borderRadius:i.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${e}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:"none"}},[`${e}-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`},[`&${e}-item-no-colon::after`]:{content:'""'}},[`${e}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${e}-item-content`]:{display:"table-cell",flex:1,color:i.colorText,fontSize:i.fontSize,lineHeight:i.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${e}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${e}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${e}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${e}-row`]:{"> th, > td":{paddingBottom:i.paddingSM}}},"&-small":{[`${e}-row`]:{"> th, > td":{paddingBottom:i.paddingXS}}}}}},f=g.default("Descriptions",i=>{const e=i.colorFillAlter,t=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`,a=i.padding,s=i.marginXS,c=i.marginXXS/2,p=m.merge(i,{descriptionsBg:e,descriptionsTitleMarginBottom:t,descriptionsExtraColor:o,descriptionItemPaddingBottom:a,descriptionsSmallPadding:n,descriptionsDefaultPadding:l,descriptionsMiddlePadding:r,descriptionsItemLabelColonMarginRight:s,descriptionsItemLabelColonMarginLeft:c});return[b(p)]});exports.default=f;
