"use strict";const t=function(t){return t.indexOf("px")>0||t.indexOf("rpx")>0||t.indexOf("em")>0||t.indexOf("rem")>0||t.indexOf("%")>0||t.indexOf("vh")>0||t.indexOf("vm")>0};exports.getBadgeInnerClass=function(t){const o=t.classPrefix;return[`${o}--basic`,t.dot?`${o}--dot`:"",`${o}--${t.size}`,`${o}--${t.shape}`,t.dot?"":`${o}--count`].join(" ")},exports.getBadgeStyles=function(o){var n,e;let s="";return o.color&&(s+=`background:${o.color};`),(null==(n=o.offset)?void 0:n[0])&&(s+=`left: calc(100% + ${t(o.offset[0].toString())?o.offset[0]:`${o.offset[0]}px`});`),(null==(e=o.offset)?void 0:e[1])&&(s+=`top:${t(o.offset[1].toString())?o.offset[1]:`${o.offset[1]}px`};`),s},exports.getBadgeValue=function(t){return t.dot?"":isNaN(t.count)||isNaN(t.maxCount)?t.count:parseInt(t.count,10)>t.maxCount?`${t.maxCount}+`:t.count},exports.isShowBadge=function(t){return!!t.dot||!(!t.showZero&&!isNaN(t.count)&&0===parseInt(t.count,10))&&null!=t.count};
