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