UNPKG

@scandit/web-datacapture-barcode

Version:

Scandit Data Capture SDK for the Web

1 lines 1.52 kB
import{CONTAINER_SELECTOR as e,TEXT_SELECTOR as t,createStyles as n,createTemplate as r,getBackgroundColor as i,getIcon as a,getText as o,getTextColor as s,getTextSize as c,setBackgroundColor as l,setText as u,setTextColor as d,setTextSize as f,updateIcon as p}from"./private/BarcodeArInfoAnnotationHeaderFooterUtils.js";import{Color as m}from"@scandit/web-datacapture-core";import{ScanditHTMLElement as h}from"@scandit/web-datacapture-core/build/js/private/utils/index.js";import{defineCustomElements as g}from"@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js";var _=class _ extends h{static create(){return _.register(),document.createElement(_.tag)}static register(){g({[_.tag]:_})}constructor(){super(),this._defaultBackgroundColor=m.fromHex(`#00FFFF`),this._defaultTextColor=m.fromHex(`#000000`);let i=this.attachShadow({mode:`open`});i.innerHTML=r(),i.append(n()),this.containerElement=i.querySelector(e),this.textElement=i.querySelector(t)}set icon(e){p(this,e)}get icon(){return a(this)}get backgroundColor(){return i(this,this._defaultBackgroundColor)}set backgroundColor(e){l(this,e)}get text(){return o(this.textElement)}set text(e){u(this.textElement,e)}get textColor(){return s(this,this._defaultTextColor)}set textColor(e){d(this,e)}get textSize(){return c(this)}set textSize(e){f(this,e)}connectedCallback(){this.backgroundColor=this.backgroundColor,this.textColor=this.textColor}};_.tag=`scandit-barcode-ar-info-annotation-header`;export{_ as BarcodeArInfoAnnotationHeader};