(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[134],{5115:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/news",function(){return r(3450)}])},3450:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSP:function(){return g},default:function(){return _}});var t=r(5893),i=r(7294);r(1664);var s=r(5675),l=r.n(s),a=r(9008),c=r.n(a),o=r(9933),d=r.n(o),u=r(7562),h=r(6546),f=r(9582);u.gsap.registerPlugin(h.ScrollTrigger,f.ScrollSmoother);var g=!0;function _(e){var n=e.newsModules,r=(0,i.useState)("all"),s=r[0],a=r[1],o=(0,i.useRef)([]);o.current=[];var f=(0,i.useRef)(),g=function(e){a(e.target.id)};(0,i.useEffect)(function(){var e=u.gsap.context(function(){u.gsap.set(o.current,{autoAlpha:0}),h.ScrollTrigger.batch(o.current,{start:"top 75%",interval:.3,onEnter:function(e){u.gsap.to(e,{autoAlpha:1,stagger:.2,duration:.5,ease:"Expo.easeOut",overwrite:!0})}})},f.current);return function(){return e.revert()}},[s]);var _=function(e){e&&!o.current.includes(e)&&o.current.push(e)};return(0,t.jsxs)("section",{ref:f,className:d().newsWrapper,children:[(0,t.jsxs)(c(),{children:[(0,t.jsx)("title",{children:"David & Goliath | News"}),(0,t.jsx)("meta",{property:"og:title",content:"David & Goliath | News"},"title")]}),(0,t.jsxs)("div",{className:d().newsContainer,children:[(0,t.jsxs)("div",{className:d().header,children:[(0,t.jsx)("div",{className:d().filterBtns,children:(0,t.jsx)("h1",{children:"News"})}),(0,t.jsxs)("div",{className:d().filterBtns,children:[(0,t.jsx)("button",{onClick:g,className:"".concat("all"===s?d().newsActive:""),children:(0,t.jsx)("h4",{id:"all",children:"All News"})}),(0,t.jsx)("button",{onClick:g,className:"".concat("press"===s?d().newsActive:""),children:(0,t.jsx)("h4",{id:"press",children:"Press"})}),(0,t.jsx)("button",{onClick:g,className:"".concat("social"===s?d().newsActive:""),children:(0,t.jsx)("h4",{id:"social",children:"Social"})})]})]}),(0,t.jsxs)("div",{className:d().newsGridContainer,children:["all"===s?n.map(function(e,n){return(0,t.jsx)("div",{ref:_,className:d().newsGridItems,children:(0,t.jsxs)("a",{role:"button","aria-label":"View ".concat(e.contentTitle),href:e.articleUrl,rel:"noreferrer",target:"_blank",children:[(0,t.jsx)("h2",{dangerouslySetInnerHTML:{__html:e.contentTitle}}),(0,t.jsx)("div",{children:(0,t.jsx)(l(),{priority:!0,src:"https:".concat(e.backgroundImage.fields.file.url),width:e.backgroundImage.fields.file.details.image.width,height:e.backgroundImage.fields.file.details.image.height,alt:e.backgroundImage.fields.title})})]})},n)}):null,"social"===s?n.filter(function(e){return"Social"===e.newsType}).map(function(e,n){return(0,t.jsx)("div",{ref:_,className:d().newsGridItems,children:(0,t.jsxs)("a",{role:"button","aria-label":"View ".concat(e.contentTitle),href:e.articleUrl,rel:"noreferrer",target:"_blank",children:[(0,t.jsx)("h2",{dangerouslySetInnerHTML:{__html:e.contentTitle}}),(0,t.jsx)("div",{children:(0,t.jsx)(l(),{priority:!0,src:"https:".concat(e.backgroundImage.fields.file.url),width:e.backgroundImage.fields.file.details.image.width,height:e.backgroundImage.fields.file.details.image.height,alt:e.backgroundImage.fields.title})})]})},n)}):null,"press"===s?n.filter(function(e){return"Press"===e.newsType}).map(function(e,n){return(0,t.jsx)("div",{ref:_,className:d().newsGridItems,children:(0,t.jsxs)("a",{role:"button","aria-label":"View ".concat(e.contentTitle),href:e.articleUrl,rel:"noreferrer",target:"_blank",children:[(0,t.jsx)("h2",{dangerouslySetInnerHTML:{__html:e.contentTitle}}),(0,t.jsx)("div",{children:(0,t.jsx)(l(),{priority:!0,src:"https:".concat(e.backgroundImage.fields.file.url),width:e.backgroundImage.fields.file.details.image.width,height:e.backgroundImage.fields.file.details.image.height,alt:e.backgroundImage.fields.title})})]})},n)}):null]})]})]})}},9933:function(e){e.exports={newsWrapper:"News_newsWrapper__AISTM",newsContainer:"News_newsContainer__z_m_2",lineParent:"News_lineParent__Z_ufE",header:"News_header__LaTne",filterBtns:"News_filterBtns__jPf2m",newsActive:"News_newsActive__rjbfT",newsGridItems:"News_newsGridItems__R838L",newsGridContainer:"News_newsGridContainer__XrQ_X"}}},function(e){e.O(0,[774,888,179],function(){return e(e.s=5115)}),_N_E=e.O()}]);