import{d as x,c as H}from"./fieldsStore-CNpVuoPu.js";import{d as I,e as c,f,t as k,i as v,x as y,F as M,r as N}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as V}from"./vendor-vue-reactivity-CheHbvBM.js";import{b,t as _,a as j}from"./vendor-vue-shared-DrzsEcag.js";import"./vendor-pinia-BSPefQhS.js";import"./settingsStore-8bwiLMEn.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./appStore-CFAkQG2b.js";import"./translationsStore-D6vLzgNA.js";import"./vendor-moment-Cv92BTSA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-php-date-formatter-DSpPwBF8.js";import"./callbackStore-BhxBUA6V.js";const w={class:"ccb-pdf-layout__item--wrapper customer_block","data-id":"customer_block"},E={class:"ccb-pdf-item-info",style:{"flex-direction":"column !important","margin-top":"0"}},R=["innerHTML"],at=I({__name:"CustomerBlock",props:{pdf:{},item:{},content:{}},setup(F){const h=F,{pdf:D,item:n}=V(h),z=c(()=>{var e,o,s,l,i,r,u,d,m,p,S;const t={},a=(o=(e=D.value)==null?void 0:e.document)==null?void 0:o.tabs;return(i=(l=(s=a==null?void 0:a.body)==null?void 0:s.data)==null?void 0:l.backgroundColor)!=null&&i.value&&(t.backgroundColor=a.body.data.backgroundColor.value),(S=(p=(m=(d=(u=(r=n.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?t.backgroundColor=n.value.tabs.design.data.backgroundColor.value:t.backgroundColor="transparent",t}),B=c(()=>x().getOrderId),C=c(()=>x().getOrderData),O=c(()=>{var t,a,e,o,s;return((s=(o=(e=(a=(t=n.value)==null?void 0:t.tabs)==null?void 0:a.text)==null?void 0:e.data)==null?void 0:o.title)==null?void 0:s.value)||""}),T=c(()=>{var a,e,o,s,l,i,r,u,d,m,p;const t={};return(i=(l=(s=(o=(e=(a=n.value)==null?void 0:a.tabs)==null?void 0:e.design)==null?void 0:o.data)==null?void 0:s.titleColor)==null?void 0:l.data)!=null&&i.status&&(t.color=n.value.tabs.design.data.titleColor.value),(p=(m=(d=(u=(r=n.value)==null?void 0:r.tabs)==null?void 0:u.design)==null?void 0:d.data)==null?void 0:m.titleFontSize)!=null&&p.value&&(t.fontSize=`${n.value.tabs.design.data.titleFontSize.value}px`),t}),g=c(()=>{var a,e,o,s,l,i;const t={};return(i=(l=(s=(o=(e=(a=n.value)==null?void 0:a.tabs)==null?void 0:e.design)==null?void 0:o.data)==null?void 0:s.textColor)==null?void 0:l.data)!=null&&i.status&&(t.color=n.value.tabs.design.data.textColor.value),t}),A=t=>!t&&typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1),L=c(()=>{var o,s,l,i;let a=H().getFormFields;(s=(o=C.value)==null?void 0:o.formDetails)!=null&&s.fields&&(a=(i=(l=C.value)==null?void 0:l.formDetails)==null?void 0:i.fields);let e=[];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&&e.push(u)}return e});return(t,a)=>B.value?(v(),f("div",{key:0,class:"ccb-pdf-layout__item",style:b(z.value)},[y("div",w,[y("span",{class:"ccb-pdf-item-title",style:b(T.value)},_(O.value),5),y("span",E,[(v(!0),f(M,null,N(L.value,e=>(v(),f("span",{class:j(["ccb-pdf-item-info--item",[e.key]]),key:e.key},[y("span",{class:"ccb-pdf-item-info--item-label",style:b(g.value)},_(e.label),5),e.type==="formatted-text"?(v(),f("span",{key:0,class:"ccb-pdf-item-info--item-value",style:b(g.value),innerHTML:e.value},null,12,R)):k("",!0),e.type!=="formatted-text"?(v(),f("span",{key:1,class:"ccb-pdf-item-info--item-value",style:b(g.value)},_(e.value),5)):k("",!0)],2))),128))])])],4)):k("",!0)}});export{at as default};
//# sourceMappingURL=CustomerBlock-Gjf7BdHR.js.map
