import{Y as g,g8 as i,cy as l,bv as m,M as a,b_ as c}from"./app-k0jcl5PQ.js";const y=["website"],C={[a.Company]:"company",[a.Person]:"person"},r={getType(e){return e!=null&&e.company?a.Company:a.Person},getObject(e){const n=r.getType(e);return e==null?void 0:e[C[n]]},getPartnerBannerInfo(e){var u,o,s;const n=e.name,t=l(n,c);return{heading:n,blockColourClass:t,banner:(u=e==null?void 0:e._banner)==null?void 0:u.value,logo:(o=e==null?void 0:e._logo)==null?void 0:o.value,logoBgColour:(s=e==null?void 0:e._colour)==null?void 0:s.value}},getObjectBannerInfo(e){var o;const n=e.name,t=l(n,c),u={heading:n,blockColourClass:t};return m.isType(e,a.Company)?{...u,banner:e==null?void 0:e.banner,logo:e==null?void 0:e.logo,logoBgColour:(o=e==null?void 0:e.metadata)==null?void 0:o.colour}:u},isInContentRegion(e,n,t){var o;if(!t)return!0;const u=(o=e==null?void 0:e.contentRegions)==null?void 0:o.data;return!u||!n?!1:u.some(s=>n===s.systemName||s.systemName===i.GLOBAL)},getPartnerBannerType(e){var n,t;return(t=(n=e._videobanner)==null?void 0:n.value)!=null&&t.url?"video":"static"},getPartnerLinks(e){return e!=null&&e.data?e.data.reduce((n,t)=>{var o;const u=(o=t.name)==null?void 0:o.toLowerCase();return y.includes(u)&&(n[u]=t),n},{}):{}},getPartnerLinkObjectByType(e,n){var t;return((t=r.getPartnerLinks(e))==null?void 0:t[n])||null},getPartnerLinkByType(e,n,t){var o;const u=(o=r.getPartnerLinkObjectByType(e,n))==null?void 0:o.url;return u?t?g.urlBuilder(u,t):u:null},makeUTMs(e){return e.slug?{utm_source:"clickview",utm_medium:"referral",utm_content:"banner-link",utm_campaign:`${e.slug}-clickview-channel`}:{}}};export{r as C};
//# sourceMappingURL=BoN4RsNs.chunk.js.map
