import{a as b}from"./chunk-6DLMNEGH.js";import{a as P}from"./chunk-LSGUGXTS.js";import{a as T}from"./chunk-TC3S442Y.js";import"./chunk-N3QUG4ST.js";import"./chunk-7DRB53FH.js";import"./chunk-QZMHGA6Q.js";import"./chunk-RELVBEUI.js";import{a as N,f as j}from"./chunk-2QUP3RQX.js";import"./chunk-J363ANGI.js";import"./chunk-YA55SA6Z.js";import"./chunk-EE2S3MYD.js";import"./chunk-DQKZHRZN.js";import"./chunk-7EAWKBIV.js";import"./chunk-V64RF3DS.js";import{$b as _,Tc as A,Uc as D,fd as n,id as y,md as w,na as s,rd as L}from"./chunk-ATD4AEXQ.js";import{$c as R,Ka as l,Kc as O,Oa as o,Qb as c,Rb as S,Ta as I,Ua as u,Z as M,_c as F,bd as k,da as p,fc as d,gc as f,gd as G,id as v,k as E,ob as a,pb as r,qb as C,zb as g}from"./chunk-BXH3QC5E.js";var U=(()=>{class e{router;translateService;toastMessageService;checkpointScanFrameService;checkpointScanItemsFacade;destroySubject=new E;scannedUniqueItem;constructor(t,i,m,h,q){this.router=t,this.translateService=i,this.toastMessageService=m,this.checkpointScanFrameService=h,this.checkpointScanItemsFacade=q}ngOnInit(){this.scannedUniqueItem=this.checkpointScanFrameService.getCheckpointScannedItem()}ngOnDestroy(){this.destroySubject.next(),this.destroySubject.complete()}actionReturnToStock(){this.checkpointScanItemsFacade.returnToStock(this.scannedUniqueItem.uniqueItemID).pipe(M(this.destroySubject)).subscribe(t=>{t.flagAlreadyAttached?(this.checkpointScanFrameService.clearScan(),this.toastMessageService.showToastPanel(n.getWarningDefaultConfig().withMessage(this.translateService.instant("MSG_ITEM_FLAG_ALREADY_RETURN_TO_STOCK")))):t.flagID>0?(this.checkpointScanFrameService.clearScan(),this.toastMessageService.showToastPanel(n.getSuccessDefaultConfig().withMessage(this.translateService.instant("MSG_ITEM_FLAG_RETURN_TO_STOCK")))):this.toastMessageService.showToastPanel(n.getErrorDefaultConfig().withMessage(this.translateService.instant("MSG_NO_FLAG_ATTACHED_FOR_EVENT"))),this.router.navigate([s.MainPanel.path,s.Dialogs.CheckpointScan.path,T.Scan.path]).catch(_.EMPTY_REJECTION_HANDLER)})}actionRag(){this.checkpointScanItemsFacade.rag(this.scannedUniqueItem.uniqueItemID).pipe(M(this.destroySubject)).subscribe(t=>{t.flagAlreadyAttached?(this.checkpointScanFrameService.clearScan(),this.toastMessageService.showToastPanel(n.getWarningDefaultConfig().withMessage(this.translateService.instant("MSG_ITEM_FLAG_ALREADY_RAG")))):t.flagID>0?(this.checkpointScanFrameService.clearScan(),this.toastMessageService.showToastPanel(n.getSuccessDefaultConfig().withMessage(this.translateService.instant("MSG_ITEM_FLAG_RAG")))):this.toastMessageService.showToastPanel(n.getErrorDefaultConfig().withMessage(this.translateService.instant("MSG_NO_FLAG_ATTACHED_FOR_EVENT"))),this.router.navigate([s.MainPanel.path,s.Dialogs.CheckpointScan.path,T.Scan.path]).catch(_.EMPTY_REJECTION_HANDLER)})}static \u0275fac=function(i){return new(i||e)(o(G),o(F),o(L),o(P),o(b))};static \u0275cmp=I({type:e,selectors:[["abs-menu-option-out-frame"]],standalone:!1,decls:15,vars:9,consts:[[1,"out-frame-container"],["matRipple","",1,"out-frame-tile-card",3,"click"],["color","primary","svgIcon","stock-building-icon",1,"icon"],[1,"text"],[1,"or-label"],["color","primary",1,"icon"]],template:function(i,m){i&1&&(a(0,"div",0)(1,"mat-card",1),g("click",function(){return m.actionReturnToStock()}),C(2,"mat-icon",2),a(3,"div",3),c(4),d(5,"translate"),r()(),a(6,"div",4),c(7),d(8,"translate"),r(),a(9,"mat-card",1),g("click",function(){return m.actionRag()}),a(10,"mat-icon",5),c(11,"delete"),r(),a(12,"div",3),c(13),d(14,"translate"),r()()()),i&2&&(l(4),S(f(5,3,"LBL_RETURN_TO_STOCK")),l(3),S(f(8,5,"LBL_OR")),l(6),S(f(14,7,"LBL_RAG")))},dependencies:[A,N,y,R],encapsulation:2})}return e})();var H=[{path:"",component:U}],B=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=u({type:e});static \u0275inj=p({imports:[v.forChild(H),v]})}return e})();var ve=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=u({type:e});static \u0275inj=p({imports:[O,k,D,j,w,B]})}return e})();export{ve as MenuOptionOutModule};
