import { html, TemplateResult, } from 'lit-element'; import { decodeEntities } from './../../libs/utils'; const show = ( value: number, display: number ): number => display ? display : value; const digits = ( value: number, nodigits: boolean, format: string, display: number ): TemplateResult => nodigits ? html`` : html` ${show(value, display)}${decodeEntities(format)} ` const createLabel = ( label: string, value: number, nodigits: boolean, format: string, display: number, disabled: boolean ): TemplateResult => label.length ? html`
${label} ${digits(value, nodigits, format, display)}
` : html``; export { createLabel }