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