import{a as S}from"./chunk-73YTQWGT.js";import"./chunk-26EMRQ63.js";import{a as V,b as _}from"./chunk-I4LORXOH.js";import{a as d}from"./chunk-GPXQ2AOL.js";import{Ra as P}from"./chunk-NKXT7PF4.js";import"./chunk-QVBHH5C3.js";import"./chunk-IGFM5CCE.js";import"./chunk-IJBPUSMZ.js";import"./chunk-AV5HDXJZ.js";import"./chunk-PDYJ5OYY.js";import{s as x}from"./chunk-YMOV4UGM.js";import{ua as g}from"./chunk-TDUJNOEU.js";import{Db as m,K as a,Yb as h,_b as f,dc as u,ec as C,fc as v,gc as p,lb as l,vc as w,wb as r}from"./chunk-I3FGJX2C.js";import"./chunk-AKP2VPKK.js";import"./chunk-ML3VIXIY.js";import"./chunk-INB5GR2I.js";import{a as o}from"./chunk-B7YGBANW.js";function R(i,n){if(i&1&&(C(0,"div",0)(1,"div",2),p(2,"tis-print-view-content",3),v()()),i&2){let M=w();l(2),u("data",M.dataWithClassName)}}function b(i,n){i&1&&p(0,"wk-message-bar",1),i&2&&u("fullSize",!0)}var c=(()=>{let n=class n{constructor(t,e,s){this._printViewServiceApi=t,this._activatedRoute=e,this._printViewService=s,this.fullUrl="",this.returnMode=!1,this.notFound=!1,this.dataWithClassName=[],this.data={cmp:"",stmp:0,dc:"",fd:!1}}ngOnInit(){this.fullUrl=location.href,this.returnMode=this.fullUrl.toLowerCase().indexOf("return")>-1,this._activatedRoute.queryParams.pipe(a(1)).subscribe(t=>{this.data.cmp=t.cmp,this.data.stmp=t.stmp,this.data.dc=t.dc,this.data.fd=t.fd==="true",!(!this.data.cmp||!this.data.stmp||!this.data.dc)&&(this.returnMode?this.getReturnPrint(this.data):this.getSellPrint(this.data))})}getSellPrint(t){this._printViewServiceApi.getSellPrintView(o({},t),d.KazRus).pipe(a(1)).subscribe({next:e=>{this.notFound=!1,this.dataWithClassName=e,this.dataWithClassName.length&&this._printViewService.addedClasses(this.dataWithClassName)},error:()=>{this.notFound=!0}})}getReturnPrint(t){this._printViewServiceApi.getReturnSellPrintView(o({},t),d.KazRus).pipe(a(1)).subscribe({next:e=>{this.notFound=!1,this.dataWithClassName=e,this.dataWithClassName.length&&this._printViewService.addedClasses(this.dataWithClassName)},error:()=>{this.notFound=!0}})}};n.\u0275fac=function(e){return new(e||n)(r(V),r(x),r(_))},n.\u0275cmp=m({type:n,selectors:[["tis-product-receipt-view"]],decls:2,vars:1,consts:[[1,"receipt"],["type","info","title","\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D","secondaryText","\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0447\u0435\u043A \u0435\u0449\u0435 \u043D\u0435 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D.",3,"fullSize"],[1,"print-view"],[3,"data"]],template:function(e,s){e&1&&h(0,R,3,1,"div",0)(1,b,1,1,"wk-message-bar",1),e&2&&f(s.dataWithClassName.length?0:1)},dependencies:[S,g,P],styles:[`.receipt[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.print-view[_ngcontent-%COMP%]{width:max-content;overflow:auto;display:flex;flex-direction:column;gap:10px;font-size:14px;margin:10px 0;padding:15px;border-radius:4px;box-shadow:1px 0 12px 0 var(--color-brand-90)}
/*# sourceMappingURL=product-receipt-view.component-KCU57BFN.css.map */`]});let i=n;return i})();var T=[{path:"sell",component:c,pathMatch:"full"},{path:"return",component:c,pathMatch:"full"}];export{T as routes};
//# sourceMappingURL=product-receipt-view.routes-MMPN4F2J.js.map
