import{a as S}from"./chunk-6NCNBYND.js";import{d}from"./chunk-XYC5VG3K.js";import{$ as y,U as w,X as C,_,da as v,ua as u}from"./chunk-NZ765PUK.js";import{Bb as g,Gb as m,Hc as h,Ic as x,bc as o,cc as p,dc as c,ec as f,jb as a,tc as s}from"./chunk-DYUFV4HF.js";function O(e,n){if(e&1&&(p(0,"pre",5),h(1),c()),e&2){let r=s(),t=r.$implicit,i=r.index,l=s();o("ngStyle",l.styleObj[i]),a(),x(t.value)}}function F(e,n){if(e&1&&f(0,"i",6),e&2){let r=s().$implicit;o("ngClass",r.value)}}function b(e,n){if(e&1&&(p(0,"div",7),f(1,"qrcode",8),c()),e&2){let r=s().$implicit;a(),o("qrdata",r.value)("cssClass","center")("elementType","svg")("width",175)}}function T(e,n){if(e&1&&(p(0,"div")(1,"div",1),m(2,O,2,2,"pre",2)(3,F,1,1,"i",3)(4,b,2,4,"div",4),c()()),e&2){let r=n.$implicit,t=s();a(),o("ngSwitch",r.type),a(),o("ngSwitchCase",t.printFormat.text),a(),o("ngSwitchCase",t.printFormat.image),a(),o("ngSwitchCase",t.printFormat.qrCode)}}var V=(()=>{let n=class n{constructor(){this.printFormat={text:d.Text,image:d.Image,qrCode:d.QrCode},this.styleObj=[]}set data(t){t&&(this._data=t,this._processData())}get data(){return this._data}_processData(){this.styleObj=[],this.data&&this.data.forEach(t=>{this._getStyle(t.className||"")})}_getStyle(t){let i={"font-weight":"500","font-size":"12px","font-style":"","text-decoration":"","line-height":"14px"};t.indexOf("bold")>-1&&(i["font-weight"]="700",i["line-height"]="28px"),t.indexOf("doubleWidth")>-1&&(i["font-size"]="24px",i["line-height"]="28px"),t.indexOf("italic")>-1&&(i["font-style"]="italic"),t.indexOf("underline")>-1&&(i["text-decoration"]="underline"),this.styleObj.push(i)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=g({type:n,selectors:[["tis-print-view-content"]],inputs:{data:"data"},decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],[3,"ngSwitch"],["style","margin: 0; white-space: pre-wrap; word-wrap: break-word",3,"ngStyle",4,"ngSwitchCase"],[3,"ngClass",4,"ngSwitchCase"],["style","text-align: center",4,"ngSwitchCase"],[2,"margin","0","white-space","pre-wrap","word-wrap","break-word",3,"ngStyle"],[3,"ngClass"],[2,"text-align","center"],[3,"qrdata","cssClass","elementType","width"]],template:function(i,l){i&1&&m(0,T,5,4,"div",0),i&2&&o("ngForOf",l.data)},dependencies:[u,w,C,v,_,y,S],encapsulation:2});let e=n;return e})();export{V as a};
//# sourceMappingURL=chunk-55MYJAE6.js.map
