import {Color}from'@scandit/web-datacapture-core';import {gray900}from'@scandit/web-datacapture-core/build/js/private/ui/colors.js';import {ScanditHTMLElement,html,defineCustomElements,css}from'@scandit/web-datacapture-core/build/js/private/utils/index.js';var a="--text-size",i="--text-color",b="slot[name='text']",e=class e extends ScanditHTMLElement{constructor(){super();let t=this.attachShadow({mode:"open"});t.innerHTML=html`<button type="button" role="button" class="container">
      <slot name="barcode-icon"></slot>
      <slot name="text"></slot>
    </button>`,t.append(e.createStyleElement().cloneNode(true)),this.containerElement=t.querySelector(".container"),this.containerElement.style.setProperty(a,"10px"),this.containerElement.style.setProperty(i,`#${gray900.toJSON()}`);}set textSize(t){this.containerElement.style.setProperty(a,`${t}px`);}get textSize(){let t=this.containerElement.style.getPropertyValue(a).replace("px","");return Number.parseInt(t,10)}set textColor(t){this.containerElement.style.setProperty(i,`#${t.toJSON()}`);}get textColor(){let t=this.containerElement.style.getPropertyValue(i);return Color.fromHex(t)}get text(){var o,n;let t=(o=this.containerElement.querySelector(b))==null?void 0:o.assignedSlot;return (n=t==null?void 0:t.textContent)!=null?n:""}set disabled(t){this.containerElement.disabled=t;}get disabled(){return this.containerElement.disabled}static register(){defineCustomElements({[e.tag]:e});}static create(t,o){e.register();let n=document.createElement(e.tag);if(t.slot="barcode-icon",t.width=24,t.height=24,o!=null){let r=document.createElement("span");r.slot="text",r.textContent=o,n.append(r);}return n.append(t),n}static createStyleElement(){return css`.container{align-items:center;-webkit-appearance:none;background-color:initial;border:none;color:var(--text-color);display:flex;flex-direction:column;font-family:SF Pro Text,sans-serif;font-size:var(--text-size);gap:6px;justify-content:center;margin:0;padding:10px;transition:background-color .1s ease-in-out}.container:hover{background-color:#e0e0e0}.container:active{background-color:#ccc}`}};e.tag="scandit-barcode-ar-popover-button-annotation";var c=e;export{c as a};