import{a as T}from"./chunk-SFHHKYOG.js";import{a as E,b as N}from"./chunk-NFHDFBTL.js";import"./chunk-T2ZXHDV7.js";import{a as D,c as O,m as R}from"./chunk-W3T7TSU6.js";import{e as w,f as p}from"./chunk-UOH2CMSN.js";import"./chunk-4F4MHU5U.js";import"./chunk-DFIFTGMN.js";import"./chunk-IDTJ2LL2.js";import"./chunk-CXVAGXS5.js";import"./chunk-7PXFMVM2.js";import"./chunk-XLLQ6366.js";import"./chunk-Z5PP2CRF.js";import"./chunk-MANB3PJC.js";import"./chunk-A4FSGNM7.js";import{Ad as A,ca as m,uc as l}from"./chunk-CBXQYRPM.js";import{Bc as S,La as n,Rc as v,Tc as I,Yc as _,Za as u,Zc as c,cb as f,da as o,gb as h,ka as g,la as r,mb as F,nb as C,vb as M}from"./chunk-LVXYIJUI.js";var y=(()=>{class e extends w{constructor(i,t,a,s){super(i,t),this.rewashScanService=a,this.router=s,this.class="abs-menu-option-add-flag-frame",this.scanDialogCode=O.REWASH_SCAN,this.selectedFlagID=-1}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,D.Scan.path]).catch(l.EMPTY_REJECTION_HANDLER)}isSomethingChanged(){return this.selectedFlagID>0}selectedFlagChanged(i){this.selectedFlagID=i}static{this.\u0275fac=function(t){return new(t||e)(n(A),n(v),n(T),n(_))}}static{this.\u0275cmp=g({type:e,selectors:[["abs-menu-option-add-flag-frame"]],hostVars:2,hostBindings:function(t,a){t&2&&h(a.class)},features:[u],decls:1,vars:2,consts:[[3,"addFlag","selectedFlagChanged","dialogCode","uniqueItemID"]],template:function(t,a){t&1&&(F(0,"abs-add-flag-card",0),M("addFlag",function(d){return a.onAddFlag(d)})("selectedFlagChanged",function(d){return a.selectedFlagChanged(d)}),C()),t&2&&f("dialogCode",a.scanDialogCode)("uniqueItemID",a.uniqueItemID)},dependencies:[E],encapsulation:2})}}return e})();var U=[{path:"",component:y,providers:[p],canDeactivate:[p]}],P=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=r({type:e})}static{this.\u0275inj=o({imports:[c.forChild(U),c]})}}return e})();var re=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=r({type:e})}static{this.\u0275inj=o({imports:[S,I,P,N]})}}return e})();export{re as MenuOptionAddFlagModule};
