import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useEffect as n}from"react";import{DEFAULT_BLOC_PROPERTIES as i}from"../Bloc/BlocProperties.js";import{Paragraph as o}from"../Typography/Paragraph/Paragraph.js";import"../Typography/Paragraph/Paragraph-utils.js";import{PropsGeneratorForGivenComponent as a}from"../../prop-utils.js";import{NewEventHeaderContainer as l}from"@/components/NewsEventItem/news-event-header-container";import{NewsEventItemContainer as m}from"@/components/NewsEventItem/news-event-item-container";import p from"../../node_modules/react-image-masonry/build/index.js";var s,c=e(e({},i),{title:"Replace this text...",content:"Replace this text...",category:"",filledIn:"",publishedOn:"",author:"",images:[],pdf:"",video:""}),d=(s=a({title:"Replace this text"},["title","content","category","filledIn"],[])).propsGenerator,g=s.propsParser;export default function(e){e.editorMode;var i=e.title,a=e.content,s=e.publishedOn,c=e.category,d=e.filledIn,g=e.author,h=e.onNewsArticleChange,f=e.images,u=e.pdf,v=e.video,w=r(window.innerWidth),x=w[0],y=w[1];n((function(){window.addEventListener("resize",(function(){y(window.innerWidth)}))}));var E=function(e){var t=e.properties;h({properties:{title:t.text,content:a,category:c,filledIn:d,publishedOn:s,author:g,images:f,pdf:u,video:v}})},I=function(e){var t=e.properties;h({properties:{title:i,content:t.content,category:c,filledIn:d,publishedOn:s,author:g,images:f,pdf:u,video:v}})};return t.createElement(t.Fragment,null,t.createElement(t.Fragment,null,t.createElement(l,{title:i,imageSrc:"",onTitleChange:E}),t.createElement(m,{filledIn:d,publishedOn:s,filledInUrl:"",relatedCategories:"",relatedCategoriesLink:""},t.createElement(o,{content:a,onTextEditorChange:I,align:"left",fontSize:"1.3125rem",lineHeight:"30.03px",fontFamily:"Bressay, Sukhumvit Set",letterSpacing:"0",textTransform:"normal",lumo:"primary-dark"}),f&&f.length>1?t.createElement(p,{imageUrls:f,numCols:x<600?1:2,containerWidth:"100%"}):t.createElement("img",{src:f?f[0]:""}),v&&t.createElement("iframe",{style:{textAlign:"center"},width:"550",height:"309",src:v,frameBorder:"0"})),t.createElement("style",null,"\n        .news-article-image-wrapper {\n          max-height: 375px;\n          max-width: 675px;\n        }\n\n\n\n      ")))}export{c as DEFAULT_NEWS_ARTICLE,d as newsArticlePropsGenerator,g as newsArticlePropsParser};
//# sourceMappingURL=NewsArticle.js.map
