import{a as q,C as E,b as n,m as p,g as f,p as z,q as x,P as r,D as A}from"./convert-case-to-camel-case.utils-DDUpNI96.js";const H=["src"],P={key:0,class:"ccb-pdf-item-text-box"},F=q({__name:"BrandBlock",props:{pdf:{},item:{}},setup(w){const B=w,{pdf:C,item:e}=E(B),N=n(()=>{var o,s,l,d,c;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((c=(d=e.value)==null?void 0:d.tabs)!=null&&c.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),D=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}),I=n(()=>{var o,s,l,d,c,u,i,v,g,b,y,m;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=(c=e.value.tabs)==null?void 0:c.name)==null?void 0:u.data)==null?void 0:i.fontColor)!=null&&v.data.status&&(a.color=e.value.tabs.name.data.fontColor.value),(m=(y=(b=(g=e.value.tabs)==null?void 0:g.name)==null?void 0:b.data)==null?void 0:y.fontSize)!=null&&m.value&&(a.fontSize=`${e.value.tabs.name.data.fontSize.value}px`),a}),L=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}),V=n(()=>{var o,s,l,d,c,u,i,v,g,b,y,m;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=(c=e.value.tabs)==null?void 0:c.slogan)==null?void 0:u.data)==null?void 0:i.fontColor)!=null&&v.data.status&&(a.color=e.value.tabs.slogan.data.fontColor.value),(m=(y=(b=(g=e.value.tabs)==null?void 0:g.slogan)==null?void 0:b.data)==null?void 0:y.fontSize)!=null&&m.value&&(a.fontSize=`${e.value.tabs.slogan.data.fontSize.value}px`),a}),W=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:r(N.value)},[z("div",{class:"ccb-pdf-layout__item--wrapper brand_block","data-id":"brand_block",style:r($.value)},[z("div",{class:"ccb-pdf-item-img",style:r(j.value)},[k.value?(f(),p("img",{key:0,src:k.value,alt:"company logo",style:r(D.value)},null,12,H)):x("",!0)],4),_.value||h.value?(f(),p("div",P,[_.value?(f(),p("span",{key:0,class:"ccb-pdf-item-text-box--title",style:r(I.value)},A(L.value),5)):x("",!0),h.value?(f(),p("span",{key:1,class:"ccb-pdf-item-text-box--description",style:r(V.value)},A(W.value),5)):x("",!0)])):x("",!0)],4)],4))}});export{F as default};
//# sourceMappingURL=BrandBlock-CI4AT4R8.js.map
