@scandit/web-datacapture-barcode
Version:
Scandit Data Capture SDK for the Web
6 lines (3 loc) • 739 B
JavaScript
import { b } from './chunk-XCZGCZ5K.js';
var i=class{constructor(){this.properties={};this.symbologies={};}get enabledSymbologies(){return Object.keys(this.symbologies).filter(e=>this.symbologies[e].isEnabled)}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 {properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((e,o)=>(e[o]=this.symbologies[o].toJSONObject(),e),{})}}};
export { i as a };