import{a as T}from"./chunk-5B25VFZA.js";import{a as E,b as N}from"./chunk-URGH7HUK.js";import{a as O,e as R}from"./chunk-TC3S442Y.js";import{e as D,f as p}from"./chunk-RZX3K5HT.js";import"./chunk-3TM4PNYS.js";import"./chunk-QZHSUPXF.js";import"./chunk-MPIXEIKK.js";import"./chunk-YBGMN6OR.js";import"./chunk-VN3CQEPZ.js";import"./chunk-WQGDHA2L.js";import"./chunk-RELVBEUI.js";import"./chunk-2QUP3RQX.js";import"./chunk-YFLLMV2L.js";import"./chunk-J363ANGI.js";import"./chunk-RKWKUAWW.js";import"./chunk-YA55SA6Z.js";import"./chunk-EE2S3MYD.js";import"./chunk-7EAWKBIV.js";import"./chunk-V64RF3DS.js";import{$b as l,na as m,p as v,qd as w}from"./chunk-ATD4AEXQ.js";import{Kc as M,Oa as n,Pb as S,Ta as u,Ua as r,Xa as g,_c as I,bd as A,da as o,gd as _,id as c,nb as f,ob as F,pb as h,zb as C}from"./chunk-BXH3QC5E.js";var y=(()=>{class e extends D{rewashScanService;router;class="abs-menu-option-add-flag-frame";dialogCode=v.REWASH_SCAN;uniqueItemID;selectedFlagID=-1;constructor(i,t,a,d){super(i,t),this.rewashScanService=a,this.router=d}ngOnInit(){this.uniqueItemID=this.rewashScanService.getRewashScannedItem()?.uniqueItemID}onAddFlag(i){if(!l.isNullOrUndefined(i)){let t=new R(i,!1,!0);this.rewashScanService.addNewFlag(t),this.rewashScanService.removeExistingFlag(i)}this.rewashScanService.newFlagAdded(),this.selectedFlagID=-1,this.router.navigate([m.MainPanel.path,m.Dialogs.RewashScan.path,O.Scan.path]).catch(l.EMPTY_REJECTION_HANDLER)}isSomethingChanged(){return this.selectedFlagID>0}selectedFlagChanged(i){this.selectedFlagID=i}static \u0275fac=function(t){return new(t||e)(n(w),n(I),n(T),n(_))};static \u0275cmp=u({type:e,selectors:[["abs-menu-option-add-flag-frame"]],hostVars:2,hostBindings:function(t,a){t&2&&S(a.class)},standalone:!1,features:[g],decls:1,vars:2,consts:[[3,"addFlag","selectedFlagChanged","dialogCode","uniqueItemID"]],template:function(t,a){t&1&&(F(0,"abs-add-flag-card",0),C("addFlag",function(s){return a.onAddFlag(s)})("selectedFlagChanged",function(s){return a.selectedFlagChanged(s)}),h()),t&2&&f("dialogCode",a.dialogCode)("uniqueItemID",a.uniqueItemID)},dependencies:[E],encapsulation:2})}return e})();var P=[{path:"",component:y,providers:[p],canDeactivate:[p]}],q=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=r({type:e});static \u0275inj=o({imports:[c.forChild(P),c]})}return e})();var re=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=r({type:e});static \u0275inj=o({imports:[M,A,q,N]})}return e})();export{re as MenuOptionAddFlagModule};
