const e=require("../../_util/util.js"),t=require("../../style/presetColor.js"),n=require("../../style/index.js"),r=require("../../theme/util/genComponentStyleHook.js"),i=require("../../theme/util/statistic.js");var a=(t,n,r)=>{let i=e.capitalize(r);return{[`${t.componentCls}-${n}`]:{color:t[`color${r}`],background:t[`color${i}Bg`],borderColor:t[`color${i}Border`],[`&${t.componentCls}-borderless`]:{borderColor:`transparent`}}}},o=e=>t.genPresetColor(e,(t,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:a})=>({[`${e.componentCls}-${t}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:`transparent`}}})),s=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:i,componentCls:a}=e,o=i-r,s=t-r;return{[a]:{...n.resetComponent(e),display:`inline-block`,height:`auto`,marginInlineEnd:e.marginXS,paddingInline:o,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:`nowrap`,background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:`start`,[`&${a}-rtl`]:{direction:`rtl`},"&, a, a:hover":{color:e.tagDefaultColor},[`${a}-close-icon`]:{marginInlineStart:s,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:`transparent`,[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:`transparent`,borderColor:`transparent`,cursor:`pointer`,[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:`none`},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}},[`${a}-borderless`]:{borderColor:`transparent`,background:e.tagBorderlessBg}}},c=r.default(`Tag`,e=>{let{fontSize:t,lineHeight:n,lineWidth:r,fontSizeIcon:c}=e,l=Math.round(t*n),u=e.fontSizeSM,d=l-r*2,f=e.colorFillAlter,p=e.colorText,m=i.merge(e,{tagFontSize:u,tagLineHeight:d,tagDefaultBg:f,tagDefaultColor:p,tagIconSize:c-2*r,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[s(m),o(m),a(m,`success`,`Success`),a(m,`processing`,`Info`),a(m,`error`,`Error`),a(m,`warning`,`Warning`)]});exports.default=c;