import{ca as d,k as a,l as i}from"./chunk-LVXYIJUI.js";var g=(()=>{class s{constructor(){this.soilItemScannedSubject=new a,this.soilItemScanned$=this.soilItemScannedSubject.asObservable(),this.existingFlagsSubject=new i([]),this.existingFlags$=this.existingFlagsSubject.asObservable(),this.newlyAddedFlagsSubject=new i([]),this.newlyAddedFlags$=this.newlyAddedFlagsSubject.asObservable(),this.newFlagAddedSubject=new a,this.newFlagAdded$=this.newFlagAddedSubject.asObservable(),this.handleFlagsSubject=new a,this.handleFlags$=this.handleFlagsSubject.asObservable(),this.scanningWorkCollectedTodaySubject=new i(!1),this.scanningWorkCollectedToday$=this.scanningWorkCollectedTodaySubject.asObservable(),this.variableChargesAddedSubject=new a,this.variableChargesAdded$=this.variableChargesAddedSubject.asObservable(),this.screenWidgetsList=[]}setSoilScannedItem(e){if(e){let t=e?.customerID;this.customerChanged=this.lastCustomerID!==t,this.customerChanged&&(this.lastCustomerID=t)}this.soilScannedItem=e,this.soilItemScannedSubject.next()}getSoilScannedItem(){return this.soilScannedItem}setExistingFlags(e){this.existingFlagsSubject.next([...e])}addNewFlag(e){let t=this.newlyAddedFlagsSubject.getValue();this.newlyAddedFlagsSubject.next([...t,e])}removeNewlyAddedFlag(e){let l=this.newlyAddedFlagsSubject.getValue().filter(n=>!this.isSameFlag(n.uniqueItemFlag,e));this.newlyAddedFlagsSubject.next(l)}removeNewlyAddedFlags(){this.newlyAddedFlagsSubject.next([])}removeExistingFlag(e){let l=this.existingFlagsSubject.getValue().filter(n=>!this.isSameFlag(n.uniqueItemFlag,e));this.existingFlagsSubject.next(l)}isSameFlag(e,t){return e.flag.id===t.flag.id}newFlagAdded(){this.newFlagAddedSubject.next()}handleFlags(e){this.handleFlagsSubject.next(e)}setWorkCollectedToday(e){this.scanningWorkCollectedTodaySubject.next(e)}isWorkCollectedToday(){return this.scanningWorkCollectedTodaySubject.getValue()}variableChargesAdded(){this.variableChargesAddedSubject.next()}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{g as a};
