UNPKG

scandit-web-datacapture-barcode

Version:

Scandit Data Capture SDK for the Web

6 lines (3 loc) 873 B
import { b } from './chunk-TRWFJYCT.js'; var s=(e=>(e.A="A",e))(s||{}),i=class r{constructor(){this.scenario=null;this.properties={};this.symbologies={};}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>this.symbologies[e].isEnabled)}static forScenario(e){let o=new r;return o.scenario=e,o}settingsForSymbology(e){if(!this.symbologies[e]){let o=b.SymbologySettings[e];o._symbology=e,this.symbologies[e]=o;}return this.symbologies[e]}setProperty(e,o){this.properties[e]=o;}getProperty(e){return this.properties[e]}enableSymbologies(e){for(let o of e)this.enableSymbology(o,!0);}enableSymbology(e,o){this.settingsForSymbology(e).isEnabled=o;}toJSONObject(){return {scenario:this.scenario,properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((e,o)=>(e[o]=this.symbologies[o].toJSONObject(),e),{})}}}; export { s as a, i as b };