import{a as j}from"./chunk-4KBZKTAT.js";import{b as T,c as D}from"./chunk-EBRSXJQS.js";import{a as O}from"./chunk-W3T7TSU6.js";import{e as F,f as c}from"./chunk-UOH2CMSN.js";import"./chunk-4F4MHU5U.js";import"./chunk-GVTXDHN3.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 I,Bd as _,ca as m,md as q,uc as M}from"./chunk-CBXQYRPM.js";import{Bc as g,La as r,Rc as v,Tc as S,Yc as E,Za as f,Zc as u,cb as h,da as a,ka as d,la as s,mb as l,nb as R,vb as C}from"./chunk-LVXYIJUI.js";var P=(()=>{class e extends F{constructor(i,t,n,o,p){super(i,o),this.router=t,this.toastMessageService=n,this.translateService=o,this.checkpointScanFrameService=p,this.unsavedChanges=!1}ngOnInit(){this.uniqueItemID=this.checkpointScanFrameService.getCheckpointScannedItem()?.uniqueItemID}onConfirmRequestRepair(i){let t=i?"MSG_REPAIR_REMOVED":"MSG_REPAIR_REQUESTED";this.toastMessageService.showToastPanel(q.getSuccessDefaultConfig().withMessage(this.translateService.instant(t))),this.unsavedChanges=!1,this.router.navigate([m.MainPanel.path,m.Dialogs.CheckpointScan.path,O.Scan.path]).catch(M.EMPTY_REJECTION_HANDLER)}repairsChanged(){this.unsavedChanges=!0}isSomethingChanged(){return this.unsavedChanges}static{this.\u0275fac=function(t){return new(t||e)(r(I),r(E),r(_),r(v),r(j))}}static{this.\u0275cmp=d({type:e,selectors:[["abs-menu-option-request-repair-frame"]],features:[f],decls:1,vars:1,consts:[[3,"repairRequested","repairsChanged","uniqueItemID"]],template:function(t,n){t&1&&(l(0,"abs-request-repair-card",0),C("repairRequested",function(p){return n.onConfirmRequestRepair(p)})("repairsChanged",function(){return n.repairsChanged()}),R()),t&2&&h("uniqueItemID",n.uniqueItemID)},dependencies:[T],encapsulation:2})}}return e})();var G=[{path:"",component:P,providers:[c],canDeactivate:[c]}],A=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=a({imports:[u.forChild(G),u]})}}return e})();var ae=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=a({imports:[g,S,A,D]})}}return e})();export{ae as MenuOptionRequestRepairModule};
