import{ca as d,k as a,l as n}from"./chunk-BXH3QC5E.js";var r=(()=>{class t{rewashScannedItemSubject=new a;rewashScannedItem$=this.rewashScannedItemSubject.asObservable();existingFlagsSubject=new n([]);existingFlags$=this.existingFlagsSubject.asObservable();newlyAddedFlagsSubject=new n([]);newlyAddedFlags$=this.newlyAddedFlagsSubject.asObservable();newFlagAddedSubject=new a;newFlagAdded$=this.newFlagAddedSubject.asObservable();handleFlagsSubject=new a;handleFlags$=this.handleFlagsSubject.asObservable();washingProcessSubject=new n(null);washingProcess$=this.washingProcessSubject.asObservable();rewashScannedItem;previousAcceptedScannedItem;lastCustomerID;customerChanged;screenWidgetsList=[];setRewashScannedItem(e){if(e)if(e.customerID){let s=e.customerID;this.customerChanged=this.lastCustomerID!==s,this.customerChanged&&(this.lastCustomerID=s)}else this.customerChanged=!1,this.lastCustomerID=-1;else this.customerChanged=!1;this.rewashScannedItem=e,this.rewashScannedItemSubject.next()}getRewashScannedItem(){return this.rewashScannedItem}setExistingFlags(e){this.existingFlagsSubject.next([...e])}addNewFlag(e){let s=this.newlyAddedFlagsSubject.getValue();this.newlyAddedFlagsSubject.next([...s,e])}removeNewlyAddedFlag(e){let l=this.newlyAddedFlagsSubject.getValue().filter(i=>!this.isSameFlag(i.uniqueItemFlag,e));this.newlyAddedFlagsSubject.next(l)}removeNewlyAddedFlags(){this.newlyAddedFlagsSubject.next([])}removeExistingFlag(e){let l=this.existingFlagsSubject.getValue().filter(i=>!this.isSameFlag(i.uniqueItemFlag,e));this.existingFlagsSubject.next(l)}isSameFlag(e,s){return e.flag.id===s.flag.id}newFlagAdded(){this.newFlagAddedSubject.next()}handleFlags(e){this.handleFlagsSubject.next(e)}setWashingProcess(e){this.washingProcessSubject.next(e)}getWashingProcess(){return this.washingProcessSubject.getValue()}hasCustomerChanged(){return this.customerChanged}static \u0275fac=function(s){return new(s||t)};static \u0275prov=d({token:t,factory:t.\u0275fac})}return t})();export{r as a};
