1import{ab as R,al as z,S as j,T as q,e as V,a4 as G,o as P,t as T,j as o,r as B,aS as S,a6 as F,da as J,ck as K,z as Q,B as k,C as i,D as f,E as r,aa as l,J as s,N as h,I as b,K as H,O as I,ag as W}from"./index-D-81gIvX.js";import{I as X}from"./ImageRenderer-DDNbq3mO.js";const Y=R({name:"CallToAction",components:{SyButton:j,ImageRenderer:X,SyMedia:z},props:{callToAction:{type:Object,default:null},siteSection:{type:Object,default:null}},setup(t){const{callToAction:a,siteSection:v}=q(t),L=V(),y=G("headerOffset",B(0)),U=o(()=>{var e;return L.getSectionIndex((e=v.value)==null?void 0:e.id)}),u=o(()=>{if(U.value===0)return y.value>0?{marginTop:`${y.value}px`}:void 0}),c=B(""),A=e=>e.match(/\{{(.*?)\}}/g),d=()=>{var e,n;return(n=(e=S())==null?void 0:e.fullPath)==null?void 0:n.includes("game-center")},m=o(()=>{var e,n,g;return!T((e=a.value)==null?void 0:e.heading)||!T((n=a.value)==null?void 0:n.subHeading)||((g=a.value)==null?void 0:g.showButton)}),p=o(()=>{var e;return((e=a.value)==null?void 0:e.buttonLinkUrlOpenInNewTab)??!1}),M=o(()=>{var e;return`${((e=a.value)==null?void 0:e.minHeight)??392}px`}),C=o(()=>{var e;return`${((e=a.value)==null?void 0:e.maxHeight)??392}px`}),w=o(()=>{var n;return`${((((n=a.value)==null?void 0:n.maxHeight)??392)/1400*100).toFixed(1)}cqi`}),$=o(()=>{var e;return((e=a.value)==null?void 0:e.alignment)==="left"}),N=o(()=>{var e;return((e=a.value)==null?void 0:e.headingUppercase)??!0}),D=o(()=>{var e;return((e=a.value)==null?void 0:e.subHeadingUppercase)??!0}),E=async e=>{if(!d()||!A(e)){c.value=e;return}const{params:{gameUuId:n}}=S(),{url:g}=await F().processGameStringTemplateInUrl(e,n);c.value=g},O=e=>J(e)&&!e.includes("https://")&&!e.includes("http://")&&!e.includes("mailto")?K(e,!0):e;return P(()=>{var e;E((e=a.value)==null?void 0:e.buttonUrl)}),{callToActionButtonLink:c,showInfo:m,openButtonLinkUrlInNewTab:p,getLinkUrl:O,isEmpty:T,ctaMinHeight:M,ctaMaxHeight:C,ctaCqi:w,containerStyle:u,isLeftAligned:$,headingUppercase:N,subHeadingUppercase:D}}}),Z={class:"call-to-action-container"},_={class:"call-to-action-info-container"};function x(t,a,v,L,y,U){var d,m,p;const u=k("sy-button"),c=k("sy-media"),A=k("image-renderer");return t.callToAction?(i(),f("section",{key:0,class:"call-to-action",style:W([{"--cta-min":t.ctaMinHeight,"--cta-max":t.ctaMaxHeight,"--cta-cqi":t.ctaCqi},t.containerStyle])},[r("div",Z,[t.showInfo?(i(),f("div",{key:0,class:l(["overlay",{"overlay--gradient":t.isLeftAligned}])},null,2)):s("",!0),r("div",_,[r("div",{class:l(["call-to-action-info",{"call-to-action-info--left":t.isLeftAligned}])},[(d=t.callToAction.heading)!=null&&d.trim()?(i(),f("h2",{key:0,class:l(["call-to-action-header",[t.isLeftAligned?"text-left":"text-center",{uppercase:t.headingUppercase}]])},h(t.callToAction.heading),3)):s("",!0),(m=t.callToAction.subHeading)!=null&&m.trim()?(i(),f("p",{key:1,class:l(["call-to-action-subheader",[{"mt-4":!t.isEmpty(t.callToAction.subHeading)},t.isLeftAligned?"text-left":"text-center",{uppercase:t.subHeadingUppercase}]])},h(t.callToAction.subHeading),3)):s("",!0),r("div",{class:l(["cta-button-desktop",t.isLeftAligned?"text-left":"text-center"])},[t.callToAction.showButton&&t.callToActionButtonLink?(i(),b(u,{key:0,primary:"",size:"big",href:t.getLinkUrl(t.callToActionButtonLink),target:t.openButtonLinkUrlInNewTab?"_blank":"_self",class:"mt-8"},{default:H(()=>[I(h(t.callToAction.buttonLabel),1)]),_:1},8,["href","target"])):s("",!0)],2),r("div",{class:l(["cta-button-mobile",t.isLeftAligned?"text-left":"text-center"])},[t.callToAction.showButton&&t.callToActionButtonLink?(i(),b(u,{key:0,primary:"",size:"medium",href:t.getLinkUrl(t.callToActionButtonLink),target:t.openButtonLinkUrlInNewTab?"_blank":"_self",class:"mt-8"},{default:H(()=>[I(h(t.callToAction.buttonLabel),1)]),_:1},8,["href","target"])):s("",!0)],2)],2)]),(p=t.callToAction.backgroundSrc)!=null&&p.includes("teamDefaultBackground")&&t.callToAction.mainMediaRenderMetaData?(i(),b(c,{key:1,media:t.callToAction.mainMediaRenderMetaData,"focal-point":t.callToAction.mainMediaRenderMetaData.focalPoint,"custom-style":"height:"+t.ctaMaxHeight},null,8,["media","focal-point","custom-style"])):(i(),b(A,{key:2,"media-string":t.callToAction.backgroundSrc},null,8,["media-string"]))])],4)):s("",!0)}const ae=Q(Y,[["render",x],["__scopeId","data-v-2ac77bce"]]);export{ae as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.