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