import{u as S}from"./Orders-BMb4HMwU.js";import{d as N,e as i,f,t as k,i as v,x as y,F as V,r as D}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as H}from"./vendor-vue-reactivity-CheHbvBM.js";import{b,t as _,a as M}from"./vendor-vue-shared-DrzsEcag.js";import"./AdminHeader-DcEh-jB1.js";import"./vendor-vue3-html2pdf-KR020wX8.js";import"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-html2canvas-BfYXEYrK.js";import"./vendor-vue-runtime-dom-B2rky8vu.js";import"./vendor-jszip-DyZzTP59.js";import"./vendor-file-saver-CzMwkcOp.js";import"./vendor-pinia-BSPefQhS.js";import"./vendor-axios-xsH4HHeE.js";import"./vendor-vue3-toastify-DBGjcIyK.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./useDebounce-BhrOLTj2.js";import"./orders-CdA50ej1.js";/* empty css               */import"./vendor-datepicker--1DmXemW.js";import"./vendor-date-fns-DoIqsk4U.js";import"./vendor-formkit-drag-and-drop-PVVCo1h2.js";import"./vendor-transliteration-CNFaxD_m.js";const j={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"],pt=N({__name:"CustomerBlock",props:{pdf:{},item:{},content:{}},setup(x){const h=x,{pdf:F,item:l}=H(h),z=i(()=>{var r,o,a,s,n,u,c,p,d,m,C;const t={},e=(o=(r=F.value)==null?void 0:r.document)==null?void 0:o.tabs;return(n=(s=(a=e==null?void 0:e.body)==null?void 0:a.data)==null?void 0:s.backgroundColor)!=null&&n.value&&(t.backgroundColor=e.body.data.backgroundColor.value),(C=(m=(d=(p=(c=(u=l.value)==null?void 0:u.tabs)==null?void 0:c.design)==null?void 0:p.data)==null?void 0:d.backgroundColor)==null?void 0:m.data)!=null&&C.status?t.backgroundColor=l.value.tabs.design.data.backgroundColor.value:t.backgroundColor="transparent",t}),B=i(()=>S().getCurrentOrderId),O=i(()=>{var t,e,r,o,a;return((a=(o=(r=(e=(t=l.value)==null?void 0:t.tabs)==null?void 0:e.text)==null?void 0:r.data)==null?void 0:o.title)==null?void 0:a.value)||""}),T=i(()=>{var e,r,o,a,s,n,u,c,p,d,m;const t={};return(n=(s=(a=(o=(r=(e=l.value)==null?void 0:e.tabs)==null?void 0:r.design)==null?void 0:o.data)==null?void 0:a.titleColor)==null?void 0:s.data)!=null&&n.status&&(t.color=l.value.tabs.design.data.titleColor.value),(m=(d=(p=(c=(u=l.value)==null?void 0:u.tabs)==null?void 0:c.design)==null?void 0:p.data)==null?void 0:d.titleFontSize)!=null&&m.value&&(t.fontSize=`${l.value.tabs.design.data.titleFontSize.value}px`),t}),g=i(()=>{var e,r,o,a,s,n;const t={};return(n=(s=(a=(o=(r=(e=l.value)==null?void 0:e.tabs)==null?void 0:r.design)==null?void 0:o.data)==null?void 0:a.textColor)==null?void 0:s.data)!=null&&n.status&&(t.color=l.value.tabs.design.data.textColor.value),t}),A=t=>!t&&typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1),I=t=>{try{const e=JSON.parse(t);return Array.isArray(e)?e.join(", "):e}catch{return t}},L=i(()=>{var o;let e=(o=S().getCurrentOrder)==null?void 0:o.order_form_details,r=[];if(e){e=e.map(a=>({...a,value:I(a.value)}));for(const a of e){const s={value:a.value,key:a.id,label:A(a.label),type:a.type};s.value&&r.push(s)}}return r});return(t,e)=>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(T.value)},_(O.value),5),y("span",w,[(v(!0),f(V,null,D(L.value,r=>(v(),f("span",{class:M(["ccb-pdf-item-info--item",[r.key]]),key:r.key},[y("span",{class:"ccb-pdf-item-info--item-label",style:b(g.value)},_(r.label),5),r.type==="formatted-text"?(v(),f("span",{key:0,class:"ccb-pdf-item-info--item-value",style:b(g.value),innerHTML:r.value},null,12,E)):k("",!0),r.type!=="formatted-text"?(v(),f("span",{key:1,class:"ccb-pdf-item-info--item-value",style:b(g.value)},_(r.value),5)):k("",!0)],2))),128))])])],4)):k("",!0)}});export{pt as default};
//# sourceMappingURL=CustomerBlock-Bhk_hYsR.js.map
