import{_ as f,av as x,ap as k,e as l,c as o,d as n,n as i,g as r,T as C,U as w,E as c,w as m,V as T,t as B,f as F,X as I,Z as L}from"./CSGWN0Ke.js";import{_ as V}from"./RssLZfLx.js";import{_ as q}from"./BITtZpNW.js";import{_ as E}from"./Dci3BOLr.js";import{C as N}from"./BQgjlXoj.js";import"./CoNkNGrd.js";import"./00Wz9xmJ.js";import"./DCT9NofI.js";const O={setup(){return{scrollBackgroundColour:x()}},components:{ContentMap:N},props:{slice:{type:Object,required:!0,default:()=>{}}},data(){return{darkColours:{"Black #000000":"bg-black text-white icons-invert","Dark grayish green #879080":"bg-green-700 text-white icons-invert","Dark grayish brown #A4A39B":"bg-brown-700 text-white icons-invert"},videoFailFallback:!1}},computed:{scrollColour(){return!!this.darkColours[this.slice.primary.backgroundColour]}},mounted(){const t="embed_url"in this.slice.primary.video&&this.slice.primary.video.embed_url;"IntersectionObserver"in window&&new IntersectionObserver((e,_)=>{e[0].isIntersecting?(this.scrollColour||(this.scrollBackgroundColour=this.slice.primary.backgroundColour),t&&this.$refs[this.slice.primary.video.embed_url].play()):t&&this.$refs[this.slice.primary.video.embed_url].pause()},{threshold:.3}).observe(this.$el)},methods:{videoFailedLoad(t){console.log("ERROR",t)}}},R=["id"],D=["srcset"],M=["srcset"],A=["src","alt"];function S(t,s,e,_,g,u){const d=I,y=V,p=L,v=k("ContentMap"),b=q,h=E;return l(),o("section",{id:"uniqueId"in e.slice.primary&&e.slice.primary.uniqueId!=""?e.slice.primary.uniqueId:"",class:i(["n-text-image",t.$styling("n-text-image",u.scrollColour?e.slice.primary.backgroundColour:"")])},[n("div",{class:i(["n-text-image__layout",t.$styling(e.slice.primary.layout?"n-text-image__layout":"n-text-image__layout-reverse")])},[n("div",{class:i(["n-text-image__content-article",t.$styling("n-text-image__content-article")])},[n("article",{class:i(["n-text-image__article",t.$styling("n-text-image__article")])},[r(d,{field:e.slice.primary.headline,class:i(["n-text-image__title",t.$styling("n-text-image__title","n-text-image__title--inverted")])},null,8,["field","class"]),r(d,{field:e.slice.primary.title,class:i(["n-text-image__headline",t.$styling("n-text-image__headline")])},null,8,["field","class"])],2),n("div",{class:i(["n-text-image__buttons",t.$styling("n-text-image__buttons")])},[(l(!0),o(C,null,w(e.slice.items,a=>(l(),c(p,{key:t.$prismic.asText(a.buttonText)+a.buttonType,btnstyle:a.buttonType},{default:m(()=>[r(y,{document:a.buttonLink,class:i(["n-text-image__button",t.$styling("n-text-image__button",`button__${a.buttonType}`)]),slice_type:e.slice.slice_type},{default:m(()=>[T(B(t.$prismic.asText(a.buttonText)),1)]),_:2},1032,["document","class","slice_type"])]),_:2},1032,["btnstyle"]))),128))],2)],2),n("div",{class:i(["n-text-image__content-image",t.$styling(e.slice.primary.layout?"n-text-image__content-image":"n-text-image__content-image-reverse")])},["mapsLocation"in e.slice.primary&&e.slice.primary.mapsLocation.latitude?(l(),c(v,{key:0,location:e.slice.primary.mapsLocation},null,8,["location"])):!g.videoFailFallback&&e.slice.primary.video&&"embed_url"in e.slice.primary.video?(l(),c(h,{key:1},{default:m(()=>[r(b,{ref:e.slice.primary.video.embed_url,"video-id":e.slice.primary.video.embed_url,class:"relative h-0 aspect-3/2 md:h-full w-full overflow-hidden fill-video",controls:!1,loop:!0,autoplay:!1,options:{background:!0},onError:s[0]||(s[0]=a=>u.videoFailedLoad(t.e))},null,8,["video-id"])]),_:1})):"mediumorientland"in e.slice.primary.image?(l(),o("div",{key:2,class:i(t.$styling("n-text-image__wrap"))},[n("picture",null,[n("source",{srcset:e.slice.primary.image.mediumorientland.url,media:"(max-width: 767px)"},null,8,D),n("source",{srcset:e.slice.primary.image.mediumorientport.url,media:"(max-width: 960px)"},null,8,M),n("img",{src:e.slice.primary.image.url,alt:e.slice.primary.image.alt||t.$prismic.asText(e.slice.primary.headline),class:i(["n-text-image__image",t.$styling("n-text-image__image")])},null,10,A)])],2)):F("",!0)],2)],2)],10,R)}const J=f(O,[["render",S]]);export{J as default};