import{b as P,c as u}from"./chunk-ZDBU37AE.js";import{d as v}from"./chunk-7EAWKBIV.js";import{I as b,fd as s,rd as g}from"./chunk-ATD4AEXQ.js";import{Ua as p,_c as S,ca as a,da as f,fa as r}from"./chunk-BXH3QC5E.js";var c=(()=>{class e{restService;constructor(i){this.restService=i}printUniqueItemLabel(i){return this.restService.post(`${b.PRINT_LABEL}/printUniqueItemLabel`,i)}static \u0275fac=function(t){return new(t||e)(r(v))};static \u0275prov=a({token:e,factory:e.\u0275fac})}return e})();var o=(()=>{class e{labelPrintingService;constructor(i){this.labelPrintingService=i}printUniqueItemLabel(i){return this.labelPrintingService.printUniqueItemLabel(i)}static \u0275fac=function(t){return new(t||e)(r(c))};static \u0275prov=a({token:e,factory:e.\u0275fac})}return e})();var m=(()=>{class e{labelPrintingFacade;translateService;toastMessageService;labelPrintingUtilsService;constructor(i,t,n,L){this.labelPrintingFacade=i,this.translateService=t,this.toastMessageService=n,this.labelPrintingUtilsService=L}printLabels(i){i.forEach((t,n)=>{this.printLabel(t,n===0)})}printLabel(i,t=!0){this.labelPrintingFacade.printUniqueItemLabel(i).subscribe(n=>{if(!n.labelPrinterDefined){t&&this.toastMessageService.showToastPanel(s.getErrorDefaultConfig().withMessage(this.translateService.instant("MSG_NO_PRINTER_FOR_LABEL")));return}if(n.labelPrintedByServer){if(!t)return;n.labelProcessed?this.toastMessageService.showToastPanel(s.getSuccessDefaultConfig().withMessage(this.translateService.instant("MSG_LABEL_PRINTED"))):this.toastMessageService.showToastPanel(s.getErrorDefaultConfig().withMessage(this.translateService.instant("MSG_LABEL_NOT_PROCESSED")));return}this.labelPrintingUtilsService.handleLabelPrinterCall(n.printQueueID,t)})}static \u0275fac=function(t){return new(t||e)(r(o),r(S),r(g),r(P))};static \u0275prov=a({token:e,factory:e.\u0275fac})}return e})();var I=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=p({type:e});static \u0275inj=f({providers:[c,o,m],imports:[u]})}return e})();export{m as a,I as b};
