import {LitElement, html, unsafeCSS} from 'lit'; import {customElement, property} from 'lit/decorators.js'; import compentStyle from './instrument-field.css?inline'; import {classMap} from 'lit/directives/class-map.js'; export enum InstrumentFieldSize { small = 'small', regular = 'regular', enhanced = 'enhanced', large = 'large', largeEnhanced = 'large-enhanced', } @customElement('obc-instrument-field') export class ObcInstrumentField extends LitElement { @property({type: String}) size: InstrumentFieldSize = InstrumentFieldSize.regular; @property({type: Number}) setpoint = 0; @property({type: Boolean}) hasSetpoint = false; @property({type: Number}) value = 0; @property({type: Boolean}) degree = false; @property({type: Number}) maxDigits = 3; @property({type: Number}) fractionDigits = 0; @property({type: String}) tag = ''; @property({type: String}) unit = ''; @property({type: String}) source = ''; @property({type: Boolean}) hasSource = false; override render() { return html`