import{u as S}from"./Orders-CAyMM97h.js";import{a as H,C as L,b as i,m as f,q as k,g as v,p as y,P as b,D as C,F as N,H as V,I as M}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import"./AdminHeader-BKv03Brb.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-xsH4HHeE.js";import"./orders-CqcFL4PP.js";/* empty css               */import"./index-CEuXXsrq.js";import"./vue-datepicker-DJOolBJW.js";/* empty css             */const j={class:"ccb-pdf-layout__item--wrapper customer_block","data-id":"customer_block"},q={class:"ccb-pdf-item-info",style:{"flex-direction":"column !important","margin-top":"0"}},w=["innerHTML"],Z=H({__name:"CustomerBlock",props:{pdf:{},item:{},content:{}},setup(x){const h=x,{pdf:F,item:l}=L(h),z=i(()=>{var a,r,o,s,n,u,c,d,p,m,_;const e={},t=(r=(a=F.value)==null?void 0:a.document)==null?void 0:r.tabs;return(n=(s=(o=t==null?void 0:t.body)==null?void 0:o.data)==null?void 0:s.backgroundColor)!=null&&n.value&&(e.backgroundColor=t.body.data.backgroundColor.value),(_=(m=(p=(d=(c=(u=l.value)==null?void 0:u.tabs)==null?void 0:c.design)==null?void 0:d.data)==null?void 0:p.backgroundColor)==null?void 0:m.data)!=null&&_.status?e.backgroundColor=l.value.tabs.design.data.backgroundColor.value:e.backgroundColor="transparent",e}),B=i(()=>S().getCurrentOrderId),O=i(()=>{var e,t,a,r,o;return((o=(r=(a=(t=(e=l.value)==null?void 0:e.tabs)==null?void 0:t.text)==null?void 0:a.data)==null?void 0:r.title)==null?void 0:o.value)||""}),I=i(()=>{var t,a,r,o,s,n,u,c,d,p,m;const e={};return(n=(s=(o=(r=(a=(t=l.value)==null?void 0:t.tabs)==null?void 0:a.design)==null?void 0:r.data)==null?void 0:o.titleColor)==null?void 0:s.data)!=null&&n.status&&(e.color=l.value.tabs.design.data.titleColor.value),(m=(p=(d=(c=(u=l.value)==null?void 0:u.tabs)==null?void 0:c.design)==null?void 0:d.data)==null?void 0:p.titleFontSize)!=null&&m.value&&(e.fontSize=`${l.value.tabs.design.data.titleFontSize.value}px`),e}),g=i(()=>{var t,a,r,o,s,n;const e={};return(n=(s=(o=(r=(a=(t=l.value)==null?void 0:t.tabs)==null?void 0:a.design)==null?void 0:r.data)==null?void 0:o.textColor)==null?void 0:s.data)!=null&&n.status&&(e.color=l.value.tabs.design.data.textColor.value),e}),T=e=>!e&&typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1),A=e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t.join(", "):t}catch{return e}},D=i(()=>{var r;let t=(r=S().getCurrentOrder)==null?void 0:r.order_form_details,a=[];if(t){t=t.map(o=>({...o,value:A(o.value)}));for(const o of t){const s={value:o.value,key:o.id,label:T(o.label),type:o.type};s.value&&a.push(s)}}return a});return(e,t)=>B.value?(v(),f("div",{key:0,class:"ccb-pdf-layout__item",style:b(z.value)},[y("div",j,[y("span",{class:"ccb-pdf-item-title",style:b(I.value)},C(O.value),5),y("span",q,[(v(!0),f(N,null,V(D.value,a=>(v(),f("span",{class:M(["ccb-pdf-item-info--item",[a.key]]),key:a.key},[y("span",{class:"ccb-pdf-item-info--item-label",style:b(g.value)},C(a.label),5),a.type==="formatted-text"?(v(),f("span",{key:0,class:"ccb-pdf-item-info--item-value",style:b(g.value),innerHTML:a.value},null,12,w)):k("",!0),a.type!=="formatted-text"?(v(),f("span",{key:1,class:"ccb-pdf-item-info--item-value",style:b(g.value)},C(a.value),5)):k("",!0)],2))),128))])])],4)):k("",!0)}});export{Z as default};
//# sourceMappingURL=CustomerBlock-DiCC5czC.js.map
