import{TinyColor as e}from"../../node_modules/.pnpm/@ctrl_tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.mjs";import{clearFix as t,textEllipsis as n}from"../../style/index.mjs";var r=e=>{let{componentCls:t,iconCls:r,uploadThumbnailSize:i,uploadProgressOffset:a}=e,o=`${t}-list`,s=`${o}-item`;return{[`${t}-wrapper`]:{[`${o}${o}-picture, ${o}${o}-picture-card`]:{[s]:{position:`relative`,height:i+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:`transparent`},[`${s}-thumbnail`]:{...n,width:i,height:i,lineHeight:`${i+e.paddingSM}px`,textAlign:`center`,flex:`none`,[r]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:`block`,width:`100%`,height:`100%`,overflow:`hidden`}},[`${s}-progress`]:{bottom:a,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:i+e.paddingXS}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${r}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:`dashed`,[`${s}-name`]:{marginBottom:a}}}}}},i=n=>{let{componentCls:r,iconCls:i,fontSizeLG:a,colorTextLightSolid:o}=n,s=`${r}-list`,c=`${s}-item`,l=n.uploadPicCardSize;return{[`${r}-wrapper${r}-picture-card-wrapper`]:{...t(),display:`inline-block`,width:`100%`,[`${r}${r}-select`]:{width:l,height:l,marginInlineEnd:n.marginXS,marginBottom:n.marginXS,textAlign:`center`,verticalAlign:`top`,backgroundColor:n.colorFillAlter,border:`${n.lineWidth}px dashed ${n.colorBorder}`,borderRadius:n.borderRadiusLG,cursor:`pointer`,transition:`border-color ${n.motionDurationSlow}`,[`> ${r}`]:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100%`,textAlign:`center`},[`&:not(${r}-disabled):hover`]:{borderColor:n.colorPrimary}},[`${s}${s}-picture-card`]:{[`${s}-item-container`]:{display:`inline-block`,width:l,height:l,marginBlock:`0 ${n.marginXS}px`,marginInline:`0 ${n.marginXS}px`,verticalAlign:`top`},"&::after":{display:`none`},[c]:{height:`100%`,margin:0,"&::before":{position:`absolute`,zIndex:1,width:`calc(100% - ${n.paddingXS*2}px)`,height:`calc(100% - ${n.paddingXS*2}px)`,backgroundColor:n.colorBgMask,opacity:0,transition:`all ${n.motionDurationSlow}`,content:`" "`}},[`${c}:hover`]:{[`&::before, ${c}-actions`]:{opacity:1}},[`${c}-actions`]:{position:`absolute`,insetInlineStart:0,zIndex:10,width:`100%`,whiteSpace:`nowrap`,textAlign:`center`,opacity:0,transition:`all ${n.motionDurationSlow}`,[`${i}-eye, ${i}-download, ${i}-delete`]:{zIndex:10,width:a,margin:`0 ${n.marginXXS}px`,fontSize:a,cursor:`pointer`,transition:`all ${n.motionDurationSlow}`}},[`${c}-actions, ${c}-actions:hover`]:{[`${i}-eye, ${i}-download, ${i}-delete`]:{color:new e(o).setAlpha(.65).toRgbString(),"&:hover":{color:o}}},[`${c}-thumbnail, ${c}-thumbnail img`]:{position:`static`,display:`block`,width:`100%`,height:`100%`,objectFit:`contain`},[`${c}-name`]:{display:`none`,textAlign:`center`},[`${c}-file + ${c}-name`]:{position:`absolute`,bottom:n.margin,display:`block`,width:`calc(100% - ${n.paddingXS*2}px)`},[`${c}-uploading`]:{[`&${c}`]:{backgroundColor:n.colorFillAlter},[`&::before, ${i}-eye, ${i}-download, ${i}-delete`]:{display:`none`}},[`${c}-progress`]:{bottom:n.marginXL,width:`calc(100% - ${n.paddingXS*2}px)`,paddingInlineStart:0}}}}};export{i as genPictureCardStyle,r as genPictureStyle};