import {a as a$1}from'./chunk-QZGFNS2K.js';import {a as a$2}from'./chunk-CYVVGAZ4.js';import {Color,ScanditIcon,ScanditIconBuilder,ScanditIconType,ScanditIconShape}from'@scandit/web-datacapture-core';import {SecondaryOrange100,gray900}from'@scandit/web-datacapture-core/build/js/private/ui/colors.js';import {ScanditHTMLElement}from'@scandit/web-datacapture-core/build/js/private/utils/ScanditHTMLElement.js';import {css}from'@scandit/web-datacapture-core/build/js/private/utils/css.js';import {defineCustomElements}from'@scandit/web-datacapture-core/build/js/private/utils/defineCustomElements.js';var c=(o=>(o[o.Top="top-center"]="Top",o[o.Bottom="bottom-center"]="Bottom",o[o.Left="left-center"]="Left",o[o.Right="right-center"]="Right",o))(c||{}),i=class i extends ScanditHTMLElement{constructor(){super();this.annotationTrigger="highlightTapAndBarcodeScan";this.anchor=c.Bottom;this.onToggleListener=this.onToggle.bind(this);this._backgroundColor=Color.fromHex("#fff");this._icon=null;this.statusIconContainer=a$1.create();}get barcode(){return this._barcode}set barcode(t){this._barcode=t;}set text(t){this.statusIconContainer.text=t;}get text(){return this.statusIconContainer.text}set hasTip(t){this.statusIconContainer.toggleAttribute("tip",t);}get hasTip(){return this.statusIconContainer.hasAttribute("tip")}set icon(t){var e;(e=this.icon)==null||e.remove(),this._icon=t,t&&(t.slot="barcode-icon",t.width=24,t.height=24,t.setIconSize(16),this.statusIconContainer.append(t));}get icon(){var t;return (t=this.statusIconContainer.querySelector(ScanditIcon.tag))!=null?t:this._icon}set backgroundColor(t){this._backgroundColor=t,this.statusIconContainer.backgroundColor=t;}get backgroundColor(){return this.statusIconContainer.backgroundColor}set textColor(t){this.statusIconContainer.textColor=t;}get textColor(){return this.statusIconContainer.textColor}static create(t){i.register();let e=document.createElement(i.tag);return e.barcode=t,e}static register(){defineCustomElements({[a$1.tag]:a$1,[i.tag]:i});}async connectedCallback(){if(!this._icon){let e=new ScanditIconBuilder().withIcon(ScanditIconType.ExclamationMark).withBackgroundShape(ScanditIconShape.Circle).withBackgroundColor(SecondaryOrange100).withIconColor(gray900).withWidth(24).withHeight(24).withIconSize(16);this._icon=await e.build();}this.icon=this._icon;let t=css`${i.tag}{align-items:center;display:flex;justify-content:center;min-height:48px;min-width:48px}`;this.append(t),this.append(this.statusIconContainer),this.statusIconContainer.append(this.icon),this.addEventListener("pointerup",this.onToggleListener);}disconnectedCallback(){this.removeEventListener("pointerup",this.onToggleListener);}onToggle(){this.statusIconContainer.expanded=!this.statusIconContainer.expanded;}updatePosition(t,e,o){a$2(this,t,e,o);}};i.tag="scandit-barcode-ar-status-icon-annotation";var a=i;export{c as a,a as b};