import{e as F,j as I}from"./widget-BUAABBRb.js";import{a as L,C as j,b as c,m as f,q as k,g as v,p as y,P as b,D as C,F as M,H as N,I as V}from"./convert-case-to-camel-case.utils-DDUpNI96.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./translationsStore-DBJu9sBR.js";const q={class:"ccb-pdf-layout__item--wrapper customer_block","data-id":"customer_block"},w={class:"ccb-pdf-item-info",style:{"flex-direction":"column !important","margin-top":"0"}},E=["innerHTML"],J=L({__name:"CustomerBlock",props:{pdf:{},item:{},content:{}},setup(x){const D=x,{pdf:h,item:i}=j(D),z=c(()=>{var t,s,o,l,n,r,u,d,m,p,S;const e={},a=(s=(t=h.value)==null?void 0:t.document)==null?void 0:s.tabs;return(n=(l=(o=a==null?void 0:a.body)==null?void 0:o.data)==null?void 0:l.backgroundColor)!=null&&n.value&&(e.backgroundColor=a.body.data.backgroundColor.value),(S=(p=(m=(d=(u=(r=i.value)==null?void 0:r.tabs)==null?void 0:u.design)==null?void 0:d.data)==null?void 0:m.backgroundColor)==null?void 0:p.data)!=null&&S.status?e.backgroundColor=i.value.tabs.design.data.backgroundColor.value:e.backgroundColor="transparent",e}),B=c(()=>F().getOrderId),_=c(()=>F().getOrderData),O=c(()=>{var e,a,t,s,o;return((o=(s=(t=(a=(e=i.value)==null?void 0:e.tabs)==null?void 0:a.text)==null?void 0:t.data)==null?void 0:s.title)==null?void 0:o.value)||""}),T=c(()=>{var a,t,s,o,l,n,r,u,d,m,p;const e={};return(n=(l=(o=(s=(t=(a=i.value)==null?void 0:a.tabs)==null?void 0:t.design)==null?void 0:s.data)==null?void 0:o.titleColor)==null?void 0:l.data)!=null&&n.status&&(e.color=i.value.tabs.design.data.titleColor.value),(p=(m=(d=(u=(r=i.value)==null?void 0:r.tabs)==null?void 0:u.design)==null?void 0:d.data)==null?void 0:m.titleFontSize)!=null&&p.value&&(e.fontSize=`${i.value.tabs.design.data.titleFontSize.value}px`),e}),g=c(()=>{var a,t,s,o,l,n;const e={};return(n=(l=(o=(s=(t=(a=i.value)==null?void 0:a.tabs)==null?void 0:t.design)==null?void 0:s.data)==null?void 0:o.textColor)==null?void 0:l.data)!=null&&n.status&&(e.color=i.value.tabs.design.data.textColor.value),e}),A=e=>!e&&typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1),H=c(()=>{var s,o,l,n;let a=I().getFormFields;(o=(s=_.value)==null?void 0:s.formDetails)!=null&&o.fields&&(a=(n=(l=_.value)==null?void 0:l.formDetails)==null?void 0:n.fields);let t=[];if(a)for(const r of a){const u={value:Array.isArray(r.value)?r.value.join(", "):r.value,key:r.id,label:A(r.label),type:r.type};u.value&&t.push(u)}return t});return(e,a)=>B.value?(v(),f("div",{key:0,class:"ccb-pdf-layout__item",style:b(z.value)},[y("div",q,[y("span",{class:"ccb-pdf-item-title",style:b(T.value)},C(O.value),5),y("span",w,[(v(!0),f(M,null,N(H.value,t=>(v(),f("span",{class:V(["ccb-pdf-item-info--item",[t.key]]),key:t.key},[y("span",{class:"ccb-pdf-item-info--item-label",style:b(g.value)},C(t.label),5),t.type==="formatted-text"?(v(),f("span",{key:0,class:"ccb-pdf-item-info--item-value",style:b(g.value),innerHTML:t.value},null,12,E)):k("",!0),t.type!=="formatted-text"?(v(),f("span",{key:1,class:"ccb-pdf-item-info--item-value",style:b(g.value)},C(t.value),5)):k("",!0)],2))),128))])])],4)):k("",!0)}});export{J as default};
//# sourceMappingURL=CustomerBlock-DVhVilSV.js.map
