import { customElement , LitElement , html , property , TemplateResult } from 'lit-element' ; import style from './belle-badge-css' ; element @ customElement ( 'belle-badge' ) export class BelleBadge extends LitElement { static styles = style ; attr @ property ( { type : Number , reflect : true } ) count = 0 ; attr @ property ( { type : Boolean } ) showZero = true ; render ( ) { return html `
      <span class="belle-badge">
        <slot></slot>
        ${ this . count > 0 && this . showZero ? html ` <sup class="belle-badge-count">${ this . count }</sup> ` : null }
      </span>
    ` ; } } declare global { interface HTMLElementTagNameMap { 'belle-badge' : BelleBadge ; } }