import{d as E,e as n,f as p,i as f,x as z,t as x}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as H}from"./vendor-vue-reactivity-CheHbvBM.js";import{b as c,t as A}from"./vendor-vue-shared-DrzsEcag.js";const R=["src"],q={key:0,class:"ccb-pdf-item-text-box"},K=E({__name:"BrandBlock",props:{pdf:{},item:{}},setup(w){const B=w,{pdf:C,item:e}=H(B),N=n(()=>{var o,s,l,d,r;const a={},t=(o=C.value.document)==null?void 0:o.tabs;if(t!=null&&t.body){const u=t.body;a.backgroundColor=((l=(s=u.data)==null?void 0:s.backgroundColor)==null?void 0:l.value)??""}if((r=(d=e.value)==null?void 0:d.tabs)!=null&&r.design){const u=e.value.tabs.design;u.data.backgroundColor.data.status?a.backgroundColor=u.data.backgroundColor.value:a.backgroundColor="transparent"}return a}),$=n(()=>{var t;const a={};return(t=e.value.tabs)!=null&&t.design&&(a.justifyContent=e.value.tabs.design.data.textAlign.value),a}),j=n(()=>{var t;const a={};if((t=e.value.tabs)!=null&&t.design){const o=e.value.tabs.design.data.textAlign.value;a.textAlign=o==="justify"?"center":o}return a}),k=n(()=>e.value.tabs.logo.data.logoImage.value),I=n(()=>({width:`${e.value.tabs.logo.data.logoWidthSize.value}px`,height:`${e.value.tabs.logo.data.logoHeightSize.value}px`})),_=n(()=>{var a,t,o,s,l;return(l=(s=(o=(t=(a=e.value.tabs)==null?void 0:a.name)==null?void 0:t.data)==null?void 0:o.showCompanyName)==null?void 0:s.data)==null?void 0:l.status}),h=n(()=>{var a,t,o,s,l;return(l=(s=(o=(t=(a=e.value.tabs)==null?void 0:a.slogan)==null?void 0:t.data)==null?void 0:o.showSlogan)==null?void 0:s.data)==null?void 0:l.status}),L=n(()=>{var o,s,l,d,r,u,i,v,g,b,m,y;const a={},t=(o=C.value.document)==null?void 0:o.tabs;if(t!=null&&t.body&&e.value.isBody){const S=t.body;a.color=((l=(s=S.data)==null?void 0:s.textColor)==null?void 0:l.value)??""}return(d=e.value.tabs)!=null&&d.design&&(a.textAlign=e.value.tabs.design.data.textAlign.value),(v=(i=(u=(r=e.value.tabs)==null?void 0:r.name)==null?void 0:u.data)==null?void 0:i.fontColor)!=null&&v.data.status&&(a.color=e.value.tabs.name.data.fontColor.value),(y=(m=(b=(g=e.value.tabs)==null?void 0:g.name)==null?void 0:b.data)==null?void 0:m.fontSize)!=null&&y.value&&(a.fontSize=`${e.value.tabs.name.data.fontSize.value}px`),a}),V=n(()=>{var a,t,o,s;return(s=(o=(t=(a=e.value.tabs)==null?void 0:a.name)==null?void 0:t.data)==null?void 0:o.showCompanyName)==null?void 0:s.value}),W=n(()=>{var o,s,l,d,r,u,i,v,g,b,m,y;const a={},t=(o=C.value.document)==null?void 0:o.tabs;if(t!=null&&t.body){const S=t.body;a.color=((l=(s=S.data)==null?void 0:s.textColor)==null?void 0:l.value)??""}return(d=e.value.tabs)!=null&&d.design&&(a.textAlign=e.value.tabs.design.data.textAlign.value),(v=(i=(u=(r=e.value.tabs)==null?void 0:r.slogan)==null?void 0:u.data)==null?void 0:i.fontColor)!=null&&v.data.status&&(a.color=e.value.tabs.slogan.data.fontColor.value),(y=(m=(b=(g=e.value.tabs)==null?void 0:g.slogan)==null?void 0:b.data)==null?void 0:m.fontSize)!=null&&y.value&&(a.fontSize=`${e.value.tabs.slogan.data.fontSize.value}px`),a}),D=n(()=>{var a,t,o,s;return(s=(o=(t=(a=e.value.tabs)==null?void 0:a.slogan)==null?void 0:t.data)==null?void 0:o.showSlogan)==null?void 0:s.value});return(a,t)=>(f(),p("div",{class:"ccb-pdf-layout__item",style:c(N.value)},[z("div",{class:"ccb-pdf-layout__item--wrapper brand_block","data-id":"brand_block",style:c($.value)},[z("div",{class:"ccb-pdf-item-img",style:c(j.value)},[k.value?(f(),p("img",{key:0,src:k.value,alt:"company logo",style:c(I.value)},null,12,R)):x("",!0)],4),_.value||h.value?(f(),p("div",q,[_.value?(f(),p("span",{key:0,class:"ccb-pdf-item-text-box--title",style:c(L.value)},A(V.value),5)):x("",!0),h.value?(f(),p("span",{key:1,class:"ccb-pdf-item-text-box--description",style:c(W.value)},A(D.value),5)):x("",!0)])):x("",!0)],4)],4))}});export{K as default};
//# sourceMappingURL=BrandBlock-BkUnXCo7.js.map
