UNPKG

@scandit/web-datacapture-barcode

Version:

Scandit Data Capture SDK for the Web

1 lines • 658 B
import{Feedback as e,Vibration as t}from"@scandit/web-datacapture-core";const n=t.withPattern([40]);var r=class t{constructor(t,r){this.noFeedback=new e(null,null),this.soundEnabled=t,this.hapticEnabled=r,this.tapFeedback=new e(r?n:null,null)}static withDefaults(e,n){return new t(e,n)}setSoundEnabled(e){this.soundEnabled=e}setHapticEnabled(t){this.hapticEnabled=t,this.tapFeedback=new e(t?n:null,null)}emitTapFeedback(){this.tapFeedback.emit()}emitBarcodeFeedback(t){new e(this.hapticEnabled?(t==null?void 0:t.feedback.vibration)??null:null,this.soundEnabled?(t==null?void 0:t.feedback.sound)??null:null).emit()}};export{r as SparkScanViewFeedbackManager};