import{b as j,c as y}from"./chunk-T6ZZJZVN.js";import{a as b}from"./chunk-XBCFP7KI.js";import{a as O}from"./chunk-TC3S442Y.js";import"./chunk-SWQ6KWB2.js";import{e as T,f as c}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 M,fd as D,na as p,qd as E,rd as F}from"./chunk-ATD4AEXQ.js";import{Kc as v,Oa as i,Ta as f,Ua as s,Xa as R,Z as l,_c as I,bd as q,da as o,gd as _,id as u,k as d,nb as S,ob as h,pb as g,zb as C}from"./chunk-BXH3QC5E.js";var A=(()=>{class e extends T{router;toastMessageService;translateService;cleanScanFrameService;uniqueItemID;unsavedChanges=!1;destroySubject=new d;constructor(r,t,n,a,m){super(r,a),this.router=t,this.toastMessageService=n,this.translateService=a,this.cleanScanFrameService=m}ngOnInit(){this.uniqueItemID=this.cleanScanFrameService.getCleanScannedItem()?.uniqueItemID,this.cleanScanFrameService.cleanScannedItem$.pipe(l(this.destroySubject)).subscribe(()=>{this.uniqueItemID=this.cleanScanFrameService.getCleanScannedItem()?.uniqueItemID})}ngOnDestroy(){this.destroySubject.next(),this.destroySubject.complete()}onConfirmRequestRepair(r){let t=r?"MSG_REPAIR_REMOVED":"MSG_REPAIR_REQUESTED";this.toastMessageService.showToastPanel(D.getSuccessDefaultConfig().withMessage(this.translateService.instant(t))),this.unsavedChanges=!1,this.router.navigate([p.MainPanel.path,p.Dialogs.CleanScan.path,O.Scan.path]).catch(M.EMPTY_REJECTION_HANDLER)}repairsChanged(){this.unsavedChanges=!0}isSomethingChanged(){return this.unsavedChanges}static \u0275fac=function(t){return new(t||e)(i(E),i(_),i(F),i(I),i(b))};static \u0275cmp=f({type:e,selectors:[["abs-menu-option-request-repair-frame"]],standalone:!1,features:[R],decls:1,vars:1,consts:[[3,"repairRequested","repairsChanged","uniqueItemID"]],template:function(t,n){t&1&&(h(0,"abs-request-repair-card",0),C("repairRequested",function(m){return n.onConfirmRequestRepair(m)})("repairsChanged",function(){return n.repairsChanged()}),g()),t&2&&S("uniqueItemID",n.uniqueItemID)},dependencies:[j],encapsulation:2})}return e})();var G=[{path:"",component:A,providers:[c],canDeactivate:[c]}],w=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=s({type:e});static \u0275inj=o({imports:[u.forChild(G),u]})}return e})();var pe=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=s({type:e});static \u0275inj=o({imports:[v,q,w,y]})}return e})();export{pe as MenuOptionRequestRepairModule};
