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