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