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