(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[366],{H7SZ:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.loading||t.loadingAggregations||!t.staticWidgetPath?t._e():i("tb-w-quicksearch-events",{attrs:{"filled-options":t.filledOptions,categories:t.categories,cities:t.cities}}),t._v(" "),i("skeleton-loader",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"mt-4",attrs:{width:"100%",height:"8rem",animation:"fade",type:"rect",radius:6,rounded:!0}})],1)};a._withStripped=!0;var n=i("/EBG"),s=i("xBaG"),r=i("J1wL"),l={name:"QuicksearchEvents",components:{TbWQuicksearchEvents:n.default},data:()=>({loading:!0,loadingAggregations:!0,categories:{},cities:{},filledOptions:{}}),computed:{...Object(s.e)(["language","serializedConfiguration","staticWidgetPath"]),...Object(s.e)("displayConfig",["cityFilterCategories"])},created(){this.fetchData()},methods:{fetchData(){Promise.all([this.fetchAggregations(),this.fetchCategories(),this.fetchCities()]).then(()=>this.loading=!1)},async fetchCities(){var t;Array.isArray(this.cityFilterCategories)&&null!==(t=this.cityFilterCategories)&&void 0!==t&&t.length?this.cities=await Object(r.a)(this.cityFilterCategories,this.articleRepository,this.$store):this.cities=await Object(r.b)("city",this.articleRepository,this.$store)},async fetchCategories(){this.categories=await this.categoryRepository.listFlattened({language:this.language})},async fetchAggregations(){this.loadingAggregations=!0;const t={language:this.language,withAggregates:!0,withResults:!1,filter:{element:"events",clientIncludingManaged:"",date:{after:"today",includeOnDemand:!0}}},e=await this.eventDateRepository.list(t);this.filledOptions=e._attributes.aggregations,this.loadingAggregations=!1}}},o=i("KHd+"),c=Object(o.a)(l,a,[],!1,null,null,null);e.default=c.exports},J1wL:function(t,e,i){"use strict";async function a(t,e,i,a=1){var n,s,r;const l=null!==(n=null===(s=i.state.actualListQuery)||void 0===s||null===(r=s.filter)||void 0===r?void 0:r.clientIncludingManaged)&&void 0!==n?n:"current",o=await e.list({filter:{categoryTypes:t,clientIncludingManaged:l},sorting:{property:"name"},language:i.state.language,unlicensed:1,minimal:a}).then(t=>t.payload);return Array.isArray(o)?{}:o}async function n(t,e,i,a=1){var n,s,r;const l=null!==(n=null===(s=i.state.actualListQuery)||void 0===s||null===(r=s.filter)||void 0===r?void 0:r.clientIncludingManaged)&&void 0!==n?n:"current",o=await e.list({filter:{category:t,clientIncludingManaged:l},sorting:{property:"name"},language:i.state.language,unlicensed:1,minimal:a}).then(t=>t.payload);return Array.isArray(o)?{}:o}i.d(e,"b",(function(){return a})),i.d(e,"a",(function(){return n}))}}]);