import{a as R,b as T}from"./chunk-NFHDFBTL.js";import{a as w}from"./chunk-V365F2PP.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 l}from"./chunk-CBXQYRPM.js";import{Bc as M,La as n,Rc as I,Tc as v,Yc as _,Za as u,Zc as c,cb as f,da as a,gb as F,ka as g,la as r,mb as h,nb as S,vb as C}from"./chunk-LVXYIJUI.js";var y=(()=>{class e extends D{constructor(i,t,o,d){super(i,t),this.soilScanFrameService=o,this.router=d,this.class="abs-menu-option-add-flag-frame",this.soilScanDialogCode=E.SOIL_SCAN_SINGLE_READ,this.selectedFlagID=-1}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([m.MainPanel.path,m.Dialogs.SoilScan.path,O.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(I),n(w),n(_))}}static{this.\u0275cmp=g({type:e,selectors:[["abs-menu-option-add-flag-frame"]],hostVars:2,hostBindings:function(t,o){t&2&&F(o.class)},features:[u],decls:1,vars:2,consts:[[3,"addFlag","selectedFlagChanged","dialogCode","uniqueItemID"]],template:function(t,o){t&1&&(h(0,"abs-add-flag-card",0),C("addFlag",function(s){return o.onAddFlag(s)})("selectedFlagChanged",function(s){return o.selectedFlagChanged(s)}),S()),t&2&&f("dialogCode",o.soilScanDialogCode)("uniqueItemID",o.uniqueItemID)},dependencies:[R],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=a({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=a({imports:[M,v,G,T]})}}return e})();export{re as MenuOptionAddFlagModule};
