import {a,b}from'./chunk-E5OIMFVX.js';import {b as b$1}from'./chunk-OLJXVUYE.js';import {Vibration,Feedback}from'@scandit/web-datacapture-core';var o=Vibration.withPattern([40]),c=class b$2{constructor(i,t){this.soundEnabled=true;this.hapticEnabled=true;this.tapVibration=this.hapticEnabled?o:null;this.tapFeedback=new Feedback(this.tapVibration,null);this.successSound=this.soundEnabled?a:null;this.successVibration=this.hapticEnabled?o:null;this.successFeedback=new Feedback(this.successVibration,this.successSound);this.errorSound=this.soundEnabled?b:null;this.noFeedback=new Feedback(null,null);this.errorVibration=this.hapticEnabled?Vibration.withPattern(b$1.SparkScan.SparkScanFeedback.errorVibrationPattern):null;this.errorFeedback=new Feedback(this.errorVibration,this.errorSound);this.soundEnabled=i,this.hapticEnabled=t;}static withDefaults(i,t){return new b$2(i,t)}setSoundEnabled(i){this.soundEnabled=i,this.successSound=i?a:null,this.successFeedback=new Feedback(this.successVibration,this.successSound),this.errorSound=i?b:null,this.errorFeedback=new Feedback(this.errorVibration,this.errorSound);}setHapticEnabled(i){this.hapticEnabled=i,this.tapVibration=i?o:null,this.tapFeedback=new Feedback(this.tapVibration,null),this.successVibration=i?Vibration.defaultVibration:null,this.successFeedback=new Feedback(this.successVibration,this.successSound),this.errorVibration=i?Vibration.withPattern(b$1.SparkScan.SparkScanFeedback.errorVibrationPattern):null,this.errorFeedback=new Feedback(this.errorVibration,this.errorSound);}emitTapFeedback(){this.tapFeedback.emit();}emitBarcodeFeedback(i){var l,u;new Feedback(this.hapticEnabled&&(l=i==null?void 0:i.feedback.vibration)!=null?l:null,this.soundEnabled&&(u=i==null?void 0:i.feedback.sound)!=null?u:null).emit();}};export{c as a};