import{ca as c,k as a,l as i}from"./chunk-BXH3QC5E.js";var g=(()=>{class s{checkpointItemScannedSubject=new a;checkpointItemScanned$=this.checkpointItemScannedSubject.asObservable();existingFlagsSubject=new i([]);existingFlags$=this.existingFlagsSubject.asObservable();newlyAddedFlagsSubject=new i([]);newlyAddedFlags$=this.newlyAddedFlagsSubject.asObservable();newFlagAddedSubject=new a;newFlagAdded$=this.newFlagAddedSubject.asObservable();handleFlagsSubject=new a;handleFlags$=this.handleFlagsSubject.asObservable();clearScanSubject=new a;clearScanSubject$=this.clearScanSubject.asObservable();variableChargesUpdatedSubject=new a;variableChargesUpdated$=this.variableChargesUpdatedSubject.asObservable();variableChargesRemovedSubject=new a;variableChargesRemoved$=this.variableChargesRemovedSubject.asObservable();checkpointScannedItem;previousAcceptedScannedItem;lastCustomerID;customerChanged;screenWidgetsList=[];setCheckpointScannedItem(e){if(e)if(e.customerID){let t=e.customerID;this.customerChanged=this.lastCustomerID!==t,this.customerChanged&&(this.lastCustomerID=t)}else this.customerChanged=!1,this.lastCustomerID=-1;else this.customerChanged=!1;this.checkpointScannedItem=e,this.checkpointItemScannedSubject.next()}getCheckpointScannedItem(){return this.checkpointScannedItem}setExistingFlags(e){this.existingFlagsSubject.next([...e])}addNewFlag(e){let t=this.newlyAddedFlagsSubject.getValue();this.newlyAddedFlagsSubject.next([...t,e])}removeNewlyAddedFlag(e){let n=this.newlyAddedFlagsSubject.getValue().filter(l=>!this.isSameFlag(l.uniqueItemFlag,e));this.newlyAddedFlagsSubject.next(n)}removeNewlyAddedFlags(){this.newlyAddedFlagsSubject.next([])}removeExistingFlag(e){let n=this.existingFlagsSubject.getValue().filter(l=>!this.isSameFlag(l.uniqueItemFlag,e));this.existingFlagsSubject.next(n)}isSameFlag(e,t){return e.flag.id===t.flag.id}newFlagAdded(){this.newFlagAddedSubject.next()}handleFlags(e){this.handleFlagsSubject.next(e)}clearScan(){this.clearScanSubject.next()}variableChargesUpdated(){this.variableChargesUpdatedSubject.next()}hasCustomerChanged(){return this.customerChanged}variableChargesRemoved(){this.variableChargesRemovedSubject.next()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=c({token:s,factory:s.\u0275fac})}return s})();export{g as a};
