(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{iYoT:function(e,i,l){"use strict";l.r(i),l.d(i,"query",(function(){return c}));var a=l("uCtA"),t=l("ERkP"),o=l.n(t),n=l("BkJp"),r=l("uVAr"),d=l("wgY5"),s=l.n(d);i.default=function(e){var i,l,t,d,c,_,m,f,p,u,v,g,h,b,E,N,y,x,k,w,A,P,j,S,z,O,F,M=e.data,I=e.pageContext,L=M.node.relationships.field_primo_piano_contenuto,T=M.node.relationships.field_primo_piano_streaming,R=L&&L.relationships.field_immagine_anteprima?L.relationships.field_immagine_anteprima:null,U=M.node.relationships.field_box_social?M.node.relationships.field_box_social.field_tipo_social:null,Y=M.node.relationships.field_accordion,C=M.node.relationships.field_link_bottone_singolo,H=[M.node.relationships.field_box_1_riga_1,M.node.relationships.field_box_1_riga_2,M.node.relationships.field_box_1_riga_3],J=[M.node.relationships.field_box_2_riga_1,M.node.relationships.field_box_2_riga_2,M.node.relationships.field_box_2_riga_3],V=[M.node.relationships.field_box_3_riga_1,M.node.relationships.field_box_3_riga_2,M.node.relationships.field_box_3_riga_3],q=M.node.relationships.field_box_rullo_1?M.node.relationships.field_box_rullo_1.relationships.field_contenuto:[],B=M.node.relationships.field_box_rullo_2?M.node.relationships.field_box_rullo_2.relationships.field_contenuto:[],D=M.node.relationships.field_link_utili_1.concat(M.node.relationships.field_link_utili_2,M.node.relationships.field_link_utili_3).map((function(e){return e.field_link_esterno?{slug:e.field_link.uri,titleLinkEsterno:"Vai al sito "+e.field_link.uri,title:e.field_titolo_link?e.field_titolo_link:e.field_link.title}:!e.field_link_esterno&&e.relationships.field_link_interno?{slug:Object(n.c)("/"+I.lang+(e.relationships.field_link_interno.fields?e.relationships.field_link_interno.fields.slug:""),"Portale",e.relationships.field_link_interno.relationships.field_sottodominio.name),title:e.field_titolo_link?e.field_titolo_link:e.relationships.field_link_interno.title}:void 0})),$=M.node.relationships.field_foto_video&&M.node.relationships.field_foto_video.map((function(e){var i,l,a,t,o,r,d,s;return{src:"video"===e.field_categoria_primaria.toLowerCase()?null===(i=e.field_video)||void 0===i?void 0:i.uri:null===(l=e.relationships)||void 0===l||null===(a=l.field_immagine_dettaglio)||void 0===a||null===(t=a.relationships)||void 0===t||null===(o=t.image)||void 0===o||null===(r=o.localFile)||void 0===r?void 0:r.publicURL,alt:e.field_alt?e.field_alt:null==e||null===(d=e.relationships)||void 0===d||null===(s=d.field_immagine_dettaglio)||void 0===s?void 0:s.field_alt,didascalia:e.field_didascalia,link:Object(n.c)("/"+I.lang+e.fields.slug,"Portale",e.relationships.field_sottodominio.name),linkTitle:e.field_titolo_esteso,categoria:e.field_categoria_primaria}})),G=function(){return q.length>0&&B<=0&&!U?"col-12":q.length>0&&B.length<=0&&U?"col-12 col-md-6 col-xl-8":q.length>0&&B.length>0&&!U?"col-12 col-sm-6":q.length>0&&B.length>0&&U?"col-12 col-md-6 col-xl-4":B.length>0&&q.length<=0&&U?"col-12 col-md-6 col-xl-8":B.length>0&&q<=0&&!U?"col-12":void 0};return o.a.createElement(a.z,{basePathNavbar:"https://www.protezionecivile.gov.it",classeAggiuntivaSubnavbar:"has-header-subnavbar",menuItems:I.menu,slugTraduzione:M.node.relationships.field_riferimento_traduzione?M.node.relationships.field_riferimento_traduzione.fields.slug:"",pageId:M.node.drupal_internal__nid,title:M.node.title,env:"prod",lang:I.lang,immagineShare:(null===(i=M.node.relationships)||void 0===i?void 0:i.field_immagine_dettaglio)?"https://www.protezionecivile.gov.it"+(null===(l=M.node.relationships)||void 0===l||null===(t=l.field_immagine_dettaglio)||void 0===t||null===(d=t.relationships)||void 0===d||null===(c=d.image)||void 0===c||null===(_=c.localFile)||void 0===_?void 0:_.publicURL):"https://www.protezionecivile.gov.it"+(null===(m=I.socialImg)||void 0===m||null===(f=m.relationships)||void 0===f||null===(p=f.image)||void 0===p||null===(u=p.localFile)||void 0===u?void 0:u.publicURL),abstractShare:(null===(v=M.node.body)||void 0===v?void 0:v.processed)?M.node.body.processed.replace(/<\/?[^>]+(>|$)/g,""):"",slug:"https://www.protezionecivile.gov.it/"+I.lang+M.node.fields.slug,minisiti:n.d,menuFooterItems:I.menuFooter},M.node.field_box_primo_piano_immagine&&o.a.createElement(a.m,{titoloSezione:M.node.field_titolo_esteso},o.a.createElement(a.n,{body:M.node.field_abstract?M.node.field_abstract.processed:"",image:null==M||null===(g=M.node)||void 0===g||null===(h=g.relationships)||void 0===h?void 0:h.field_immagine_anteprima,testoIntero:!0})),!M.node.field_box_primo_piano_immagine&&L&&!M.node.field_streaming_homepage&&o.a.createElement(a.m,{titoloSezione:"Featured"},o.a.createElement(a.n,{title:L.field_titolo_esteso,body:L.field_abstract?L.field_abstract.value:"",slug:Object(n.c)(L.fields?"/"+I.lang+L.fields.slug:"","Portale",L.relationships.field_sottodominio.name),image:R,slugText:"Read more"})),!M.node.field_box_primo_piano_immagine&&T&&M.node.field_streaming_homepage&&o.a.createElement(a.m,{titoloSezione:"Featured"},o.a.createElement(a.n,{title:T.field_titolo,body:null===(b=T.field_testo)||void 0===b?void 0:b.value,streaming:T})),Array.isArray(H)&&H.length>0&&H.map((function(e){return Array.isArray(e)&&e.length>0&&o.a.createElement(a.i,{titoloSezione:""},e.map((function(e){var i,l,a,t,r,d,s;return o.a.createElement("div",{className:"col-12 col-md-4"},o.a.createElement("article",{className:"card-wrapper card-space"},o.a.createElement("div",{className:"card card-img"},o.a.createElement("div",{className:"img-responsive-wrapper"},o.a.createElement("div",{className:"img-responsive"},o.a.createElement("figure",{className:"img-wrapper"},o.a.createElement("figcaption",{className:"sr-only"},null===(i=e.relationships)||void 0===i||null===(l=i.field_immagine_dettaglio)||void 0===l?void 0:l.field_didascalia),o.a.createElement("a",{href:Object(n.c)(e.fields?"/"+I.lang+e.fields.slug:"","Portale",null===(a=e.relationships)||void 0===a?void 0:a.field_sottodominio.name)},o.a.createElement("img",{alt:null===(t=e.relationships)||void 0===t||null===(r=t.field_immagine_dettaglio)||void 0===r?void 0:r.field_alt,src:(null===(d=e.relationships)||void 0===d?void 0:d.field_immagine_dettaglio)?e.relationships.field_immagine_dettaglio.relationships.image.localFile.publicURL:null}))))),o.a.createElement("div",{className:"card-body"},o.a.createElement("h3",{className:"card-title"},o.a.createElement("a",{href:Object(n.c)(e.fields?"/"+I.lang+e.fields.slug:"","Portale",null===(s=e.relationships)||void 0===s?void 0:s.field_sottodominio.name)},e.field_titolo_esteso))))))})))})),Array.isArray(J)&&J.length>0&&J.map((function(e){return Array.isArray(e)&&e.length>0&&o.a.createElement(a.i,{titoloSezione:""},e.map((function(e){var i,l;return o.a.createElement("div",{className:"col-12 col-md-4"},o.a.createElement(a.j,{title:e.field_titolo_esteso,body:e.field_abstract?e.field_abstract.value:null,slug:Object(n.c)(e.fields?"/"+I.lang+e.fields.slug:"","Portale",null===(i=e.relationships)||void 0===i?void 0:i.field_sottodominio.name),image:null===(l=e.relationships)||void 0===l?void 0:l.field_immagine_dettaglio}))})))})),Array.isArray(V)&&V.length>0&&V.map((function(e){return Array.isArray(e)&&e.length>0&&o.a.createElement(a.i,{titoloSezione:""},e.map((function(e){var i,l,a;return o.a.createElement("div",{className:"col-12 col-md-6"},o.a.createElement("div",{className:"card w-100"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-12 col-xl-6"},o.a.createElement("img",{src:(null===(i=e.relationships)||void 0===i?void 0:i.field_immagine_dettaglio)?e.relationships.field_immagine_dettaglio.relationships.image.localFile.childImageSharp.fluid.src:null,className:"card-img",alt:null===(l=e.relationships)||void 0===l||null===(a=l.field_immagine_dettaglio)||void 0===a?void 0:a.field_alt})),o.a.createElement("div",{className:"col-12 col-xl-6"},o.a.createElement("div",{className:"card-body"},o.a.createElement("h5",{className:"card-title"},o.a.createElement("a",{href:Object(n.c)(e.fields?"/"+I.lang+e.fields.slug:"","Portale",e.relationships.field_sottodominio.name)},e.field_titolo_esteso)),e.field_abstract&&o.a.createElement("div",{className:"card-text",dangerouslySetInnerHTML:{__html:Object(r.d)(e.field_abstract.processed,100)}}))))))})))})),M.node.field_agenda&&o.a.createElement(a.c,{eventi:M.eventi,locale:"en",portale:"Portale",minisiti:n.d}),(q||B)&&o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"px-custom"},o.a.createElement("div",{className:"row"},Array.isArray(q)&&q.length>0&&o.a.createElement("div",{className:G()},o.a.createElement("section",{className:"article-card-simple rulli"},o.a.createElement("h2",null,M.node.relationships.field_box_rullo_1.field_titolo),q.map((function(e){var i,l,a,t,r;return o.a.createElement("article",{className:"card-wrapper"},o.a.createElement("div",{className:"card"},o.a.createElement("div",{className:"card-body"},o.a.createElement("div",{className:"category-top"},o.a.createElement("span",{className:"category"},(null===(i=e.relationships)||void 0===i?void 0:i.field_tipo_provvedimento)&&(null===(l=e.relationships)||void 0===l||null===(a=l.field_tipo_provvedimento)||void 0===a?void 0:a.length)>0?e.relationships.field_tipo_provvedimento[0].field_etichetta_en:Object(n.b)(e.field_categoria_primaria).replace(/_/g," ")),o.a.createElement("span",{className:"data"},s()(e.field_data).format("D MMMM Y")),o.a.createElement("h2",{className:"card-title"},o.a.createElement("a",{href:Object(n.c)(e.fields?"/"+I.lang+e.fields.slug:"","Portale",null===(t=e.relationships)||void 0===t||null===(r=t.field_sottodominio)||void 0===r?void 0:r.name)},e.field_titolo_esteso))),o.a.createElement("div",{className:"card-text",dangerouslySetInnerHTML:{__html:e.field_abstract?e.field_abstract.processed:""}}))))})),o.a.createElement("div",{className:"card-wrapper"},o.a.createElement("div",{className:"card"},o.a.createElement("div",{className:"card-body"},o.a.createElement("a",{className:"read-more position-static",href:Object(n.c)("/"+I.lang+(null===(E=M.node.relationships.field_box_rullo_1.relationships.field_link_vedi_tutti)||void 0===E||null===(N=E.fields)||void 0===N?void 0:N.slug),"Portale",null===(y=M.node.relationships.field_box_rullo_1.relationships.field_link_vedi_tutti)||void 0===y||null===(x=y.relationships)||void 0===x||null===(k=x.field_sottodominio)||void 0===k?void 0:k.name)},o.a.createElement("span",{className:"text"},"See all"),o.a.createElement(a.F,{name:"arrow-right"}))))))),Array.isArray(B)&&B.length>0&&o.a.createElement("div",{className:G()},o.a.createElement("section",{className:"article-card-simple rulli"},o.a.createElement("h2",null,M.node.relationships.field_box_rullo_2.field_titolo),B.map((function(e){var i,l,a,t,r;return o.a.createElement("article",{className:"card-wrapper"},o.a.createElement("div",{className:"card"},o.a.createElement("div",{className:"card-body"},o.a.createElement("div",{className:"category-top"},o.a.createElement("span",{className:"category"},(null===(i=e.relationships)||void 0===i?void 0:i.field_tipo_provvedimento)&&(null===(l=e.relationships)||void 0===l||null===(a=l.field_tipo_provvedimento)||void 0===a?void 0:a.length)>0?e.relationships.field_tipo_provvedimento[0].field_etichetta_en:Object(n.b)(e.field_categoria_primaria).replace(/_/g," ")),o.a.createElement("span",{className:"data"},s()(e.field_data).format("D MMMM Y")),o.a.createElement("h2",{className:"card-title"},o.a.createElement("a",{href:Object(n.c)(e.fields?"/"+I.lang+e.fields.slug:"","Portale",null===(t=e.relationships)||void 0===t||null===(r=t.field_sottodominio)||void 0===r?void 0:r.name)},e.field_titolo_esteso))),o.a.createElement("div",{className:"card-text",dangerouslySetInnerHTML:{__html:e.field_abstract?e.field_abstract.processed:""}}))))})),o.a.createElement("div",{className:"card-wrapper"},o.a.createElement("div",{className:"card"},o.a.createElement("div",{className:"card-body"},o.a.createElement("a",{className:"read-more position-static",href:Object(n.c)("/"+I.lang+(null===(w=M.node.relationships.field_box_rullo_2.relationships.field_link_vedi_tutti)||void 0===w||null===(A=w.fields)||void 0===A?void 0:A.slug),"Portale",null===(P=M.node.relationships.field_box_rullo_2.relationships.field_link_vedi_tutti)||void 0===P||null===(j=P.relationships)||void 0===j||null===(S=j.field_sottodominio)||void 0===S?void 0:S.name)},o.a.createElement("span",{className:"text"},"See all"),o.a.createElement(a.F,{name:"arrow-right"}))))))),Array.isArray(U)&&U.length>0&&o.a.createElement(a.E,{listaSocial:U,titolo:null==M||null===(z=M.node)||void 0===z||null===(O=z.relationships)||void 0===O||null===(F=O.field_box_social)||void 0===F?void 0:F.field_titolo})))),Array.isArray($)&&$.length>0&&o.a.createElement(a.B,{title:"Photo and Video"},o.a.createElement(a.q,{items:$,lang:"/"+I.lang,itemsPerPage:3})),o.a.createElement("section",{className:"container"},Array.isArray(Y)&&Y.length>0&&o.a.createElement("h2",null,M.node.field_titolo_sezione_accordion),o.a.createElement("div",{className:"px-custom"},Array.isArray(Y)&&Y.length>0&&o.a.createElement(a.a,{id:"1"},Y.map((function(e){return o.a.createElement(a.b,{title:e.field_titolo?e.field_titolo:"",body:e.field_testo?e.field_testo.processed:"",id:e.drupal_internal__id,accordionId:"1",img:e.relationships.field_immagine,tabella:e.field_tabella?e.field_tabella.processed:null,video:e.relationships.field_video,links:e.relationships?Object(n.a)(e.relationships.field_link_interni,I.lang,"Portale"):null})}))),C&&o.a.createElement("div",{className:"btn-block-uppercase-wrapper"},o.a.createElement("a",{href:Object(n.c)("/"+I.lang+C.fields.slug,"Portale",C.relationships.field_sottodominio.name),className:"btn btn-tayeb-charcoal",role:"button"},C.field_titolo_esteso)))),Array.isArray(D)&&D.length>0&&o.a.createElement(a.w,{titoloSezione:"Useful Links",linkUtili:D}))};var c="3613316849"}}]); //# sourceMappingURL=component---src-templates-sezione-con-anticipazioni-template-en-jsx-c0545a39da33b8637468.js.map