(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{820:function(t,e,r){"use strict";var n=r(8),o=(r(36),r(240),r(98),r(19),{name:"FaqSearchForm",data:function(){return{form:{faqsearch:""},searchResults:{},success:!1}},methods:{handleSubmit:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""===(r=t.form.faqsearch).trim()){e.next=6;break}return e.next=4,t.$strapi.$faqs.find("?_where[_or][0][answer_contains]="+r+"&_where[_or][1][question_contains]="+r).then((function(data){if(data.length>0){t.searchResults=data;var e=t.$refs.faqsResults;e&&(e.style.display="block")}else{t.hideResults();var r=t.$nuxt.$t("Nous n'avons pas trouvé de résultat pour votre recherche");t.$sweetalert(r,8e3)}})).catch((function(t){console.log(t)}));case 4:e.next=7;break;case 6:t.hideResults();case 7:case"end":return e.stop()}}),e)})))()},showFaq:function(t){var e=document.querySelectorAll('[data-faq-id="'+t+'"]')[0];e.classList.contains("block")?(e.classList.remove("block"),e.classList.add("hidden")):(e.classList.remove("hidden"),e.classList.add("block"))},hideResults:function(){var t=this.$refs.faqsResults;t&&(t.style.display="none")}}}),c=r(9),component=Object(c.a)(o,(function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"w-full md:w-80 mx-auto"},[e("form",{staticClass:"md:mx-7"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.faqsearch,expression:"form.faqsearch"}],staticClass:"rounded-l-full float-left w-9/12 sm:w-11/12 md:w-52 ml-2 sm:ml-1",attrs:{type:"text",name:"faqsearch",value:"",required:""},domProps:{value:t.form.faqsearch},on:{input:function(e){e.target.composing||t.$set(t.form,"faqsearch",e.target.value)}}}),t._v(" "),e("div",{staticClass:"rounded-r-full border float-left w-10 h-10 ml-1 text-center leading-10 cursor-pointer",attrs:{type:"submit",title:t.$t("Chercher"),name:"searchbtn"},on:{click:function(e){return t.handleSubmit()}}},[e("font-awesome-icon",{staticClass:"text-dark-gray text-lg",staticStyle:{"font-size":"18px"},attrs:{icon:["fas","search"]}})],1)])]),t._v(" "),t.searchResults.length>0?e("div",{ref:"faqsResults",staticClass:"faqs clear-both pt-4",attrs:{id:"faqsResults"}},[e("div",{staticClass:"hidden toshow -mt-2 mb-2"},[t._v("\n      "+t._s(t.$t("Résultat(s) de recherche"))+"\n    ")]),t._v(" "),e("div",{staticClass:"hidden toshow absolute right-3 top-2"},[e("font-awesome-icon",{staticClass:"text-dark-gray text-xl cursor-pointer",staticStyle:{"font-size":"20px"},attrs:{icon:["fas","times-circle"]},on:{click:function(e){return t.hideResults()}}})],1),t._v(" "),t._l(t.searchResults,(function(r,n){return e("div",{key:n,staticClass:"border rounded p-2 m-1 mb-2"},[e("h3",{staticClass:"text-base m-0 font-bold cursor-pointer leading-5",on:{click:function(e){return t.showFaq(n)}}},[t._v("\n        "+t._s(r.question)+"\n      ")]),t._v(" "),e("div",{staticClass:"richContent hidden",attrs:{"data-faq-id":n},domProps:{innerHTML:t._s(t.$md.render(r.answer))}},[t._v("\n        "+t._s(r.answer)+"\n      ")])])}))],2):t._e()])}),[],!1,null,null,null);e.a=component.exports},960:function(t,e,r){"use strict";r.r(e);r(30);var n=r(8),o=(r(36),r(98),r(19),r(46),r(83),r(820)),c=r(199),l={components:{NoukiesFaqsSearch:o.a,NoukiesStrapiImage:c.a},asyncData:function(t){return Object(n.a)(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$strapi.find("faqs-categories?_locale="+t.app.i18n.locale+"&_sort=position");case 2:return r=e.sent,e.abrupt("return",{faqsCategories:r});case 4:case"end":return e.stop()}}),e)})))()},fetchOnServer:!0,data:function(){return{title:"Noukies.com : FAQ",description:"Noukies.com : FAQ",env:"https://www.noukies.com",error:null}},methods:{iconSwitch:function(t,e){var img=document.getElementById("faq"+t+"pic"),r=document.getElementById("faq"+t+"pic-hover");"over"===e?(r.classList.remove("hidden"),r.classList.add("block"),img.classList.remove("block"),img.classList.add("hidden")):(r.classList.add("hidden"),r.classList.remove("block"),img.classList.add("block"),img.classList.remove("hidden"))}},head:function(){return{title:this.title,meta:[{hid:"description",name:"description",content:this.description}]}}},d=r(9),component=Object(d.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"mx-auto max-w-7xl"},[e("h1",{staticClass:"h1-title"},[t._v(t._s(t.$t("Questions fréquentes")))]),t._v(" "),e("NoukiesFaqsSearch"),t._v(" "),e("div",{staticClass:"clear-both"}),t._v(" "),e("div",{staticClass:"grid grid-cols-2 md:grid-cols-4 mt-4"},t._l(t.faqsCategories,(function(r,n){return e("div",{key:n,staticClass:"faqlinks flex-none text-center m-2 p-2 border rounded hover:bg-dark-gray",on:{mouseover:function(e){return t.iconSwitch(n,"over")},mouseleave:function(e){return t.iconSwitch(n,"leave")}}},[e("nuxt-link",{attrs:{to:"/"+t.$i18n.locale+"/faqs/"+r.slug}},[r.picture.url?e("NoukiesStrapiImage",{attrs:{id:"faq"+n+"pic",src:r.picture.url,classtxt:"mx-auto",alt:r.name}}):t._e(),t._v(" "),r.pictureHover.url?e("NoukiesStrapiImage",{attrs:{id:"faq"+n+"pic-hover",src:r.pictureHover.url,classtxt:"mx-auto hidden",alt:r.name}}):t._e()],1),t._v(" "),e("nuxt-link",{staticClass:"faqname inline-block px-0 leading-snug hover:text-blanc break-words w-full",attrs:{to:"/"+t.$i18n.locale+"/faqs/"+r.slug}},[t._v("\n        "+t._s(r.name)+"\n      ")])],1)})),0)],1)}),[],!1,null,null,null);e.default=component.exports}}]);