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