import{resetComponent as f}from"../../style/index.mjs";import"../../theme/internal.mjs";import y from"../../theme/util/genComponentStyleHook.mjs";import{merge as I}from"../../theme/util/statistic.mjs";const b=t=>{const{listBorderedCls:i,componentCls:e,paddingLG:l,margin:a,padding:r,listItemPaddingSM:o,marginLG:n,borderRadiusLG:m}=t;return{[`${i}`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:m,[`${e}-header,${e}-footer,${e}-item`]:{paddingInline:l},[`${e}-pagination`]:{margin:`${a}px ${n}px`}},[`${i}${e}-sm`]:{[`${e}-item,${e}-header,${e}-footer`]:{padding:o}},[`${i}${e}-lg`]:{[`${e}-item,${e}-header,${e}-footer`]:{padding:`${r}px ${l}px`}}}},B=t=>{const{componentCls:i,screenSM:e,screenMD:l,marginLG:a,marginSM:r,margin:o}=t;return{[`@media screen and (max-width:${l})`]:{[`${i}`]:{[`${i}-item`]:{[`${i}-item-action`]:{marginInlineStart:a}}},[`${i}-vertical`]:{[`${i}-item`]:{[`${i}-item-extra`]:{marginInlineStart:a}}}},[`@media screen and (max-width: ${e})`]:{[`${i}`]:{[`${i}-item`]:{flexWrap:"wrap",[`${i}-action`]:{marginInlineStart:r}}},[`${i}-vertical`]:{[`${i}-item`]:{flexWrap:"wrap-reverse",[`${i}-item-main`]:{minWidth:t.contentWidth},[`${i}-item-extra`]:{margin:`auto auto ${o}px`}}}}}},u=t=>{const{componentCls:i,antCls:e,controlHeight:l,minHeight:a,paddingSM:r,marginLG:o,padding:n,listItemPadding:m,colorPrimary:g,listItemPaddingSM:p,listItemPaddingLG:c,paddingXS:s,margin:S,colorText:d,colorTextDescription:$,motionDurationSlow:x,lineWidth:h}=t;return{[`${i}`]:{...f(t),position:"relative","*":{outline:"none"},[`${i}-header, ${i}-footer`]:{background:"transparent",paddingBlock:r},[`${i}-pagination`]:{marginBlockStart:o,textAlign:"end",[`${e}-pagination-options`]:{textAlign:"start"}},[`${i}-spin`]:{minHeight:a,textAlign:"center"},[`${i}-items`]:{margin:0,padding:0,listStyle:"none"},[`${i}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:m,color:d,[`${i}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${i}-item-meta-avatar`]:{marginInlineEnd:n},[`${i}-item-meta-content`]:{flex:"1 0",width:0,color:d},[`${i}-item-meta-title`]:{marginBottom:t.marginXXS,color:d,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:d,transition:`all ${x}`,"&:hover":{color:g}}},[`${i}-item-meta-description`]:{color:$,fontSize:t.fontSize,lineHeight:t.lineHeight}},[`${i}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${s}px`,color:$,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${i}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:h,height:Math.ceil(t.fontSize*t.lineHeight)-t.marginXXS*2,transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${i}-empty`]:{padding:`${n}px 0`,color:$,fontSize:t.fontSizeSM,textAlign:"center"},[`${i}-empty-text`]:{padding:n,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${i}-item-no-flex`]:{display:"block"}},[`${i}-grid ${e}-col > ${i}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:S,paddingBlock:0,borderBlockEnd:"none"},[`${i}-vertical ${i}-item`]:{alignItems:"initial",[`${i}-item-main`]:{display:"block",flex:1},[`${i}-item-extra`]:{marginInlineStart:o},[`${i}-item-meta`]:{marginBlockEnd:n,[`${i}-item-meta-title`]:{marginBlockEnd:r,color:d,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${i}-item-action`]:{marginBlockStart:n,marginInlineStart:"auto","> li":{padding:`0 ${n}px`,"&:first-child":{paddingInlineStart:0}}}},[`${i}-split ${i}-item`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${i}-split ${i}-header`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${i}-split${i}-empty ${i}-footer`]:{borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${i}-loading ${i}-spin-nested-loading`]:{minHeight:l},[`${i}-split${i}-something-after-last-item ${e}-spin-container > ${i}-items > ${i}-item:last-child`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${i}-lg ${i}-item`]:{padding:c},[`${i}-sm ${i}-item`]:{padding:p},[`${i}:not(${i}-vertical)`]:{[`${i}-item-no-flex`]:{[`${i}-item-action`]:{float:"right"}}}}},G=y("List",t=>{const i=I(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG,listItemPadding:`${t.paddingContentVertical}px ${t.paddingContentHorizontalLG}px`,listItemPaddingSM:`${t.paddingContentVerticalSM}px ${t.paddingContentHorizontal}px`,listItemPaddingLG:`${t.paddingContentVerticalLG}px ${t.paddingContentHorizontalLG}px`});return[u(i),b(i),B(i)]},{contentWidth:220});export{G as default};
