"use strict";var g=Object.create;var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.getPrototypeOf;var u=Object.prototype.hasOwnProperty;var i=(e,s)=>a(e,"name",{value:s,configurable:true});var T=(e,s)=>{for(var t in s)a(e,t,{get:s[t],enumerable:true})};var n=(e,s,t,o)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let r of f(s))if(!u.call(e,r)&&r!==t)a(e,r,{get:()=>s[r],enumerable:!(o=b(s,r))||o.enumerable})}return e};var d=(e,s,t)=>(t=e!=null?g(h(e)):{},n(s||!e||!e.__esModule?a(t,"default",{value:e,enumerable:true}):t,e));var S=e=>n(a({},"__esModule",{value:true}),e);var j={};T(j,{default:()=>P});module.exports=S(j);var m=require("react/jsx-runtime");var c=d(require("classnames"));var l=require("react");var y=d(require("react-jss"));const N=i(e=>{const s={};Object.keys(e.styleTypes).map(t=>Object.assign(s,{[t]:{background:e.styleTypes[t].accent,color:e.styleTypes[t].contrast,border:e.styleTypes[t].border}}));return s},"badgeStyles");const R=i(e=>({badge:{display:"inline-block",padding:[3,8,4],fontSize:e.badgeFontSize,borderRadius:e.badgeBorderRadius,margin:[0,4],"&:first-child":{marginLeft:0},"&:last-child":{marginRight:0}},...N(e)}),"styles");class p extends l.Component{render(){const{classes:s,children:t,type:o="primary",className:r}=this.props;return(0,m.jsx)("div",{className:(0,c.default)({[s.badge]:true,[s[o]]:true,[`${r}`]:r}),"data-type":"franz-badge",children:t})}}i(p,"BadgeComponent");var P=(0,y.default)(R,{injectTheme:true})(p);
