(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[255],{Mob5:function(t,e,s){"use strict";s.d(e,"a",(function(){return i}));const i=Object.freeze({SNOW_TRANSPORTATION_OPEN:"snowTransportationOpen",SNOW_SLOPES_PREPARED:"snowSlopesPrepared",SNOW_TOURS_PREPARED:"snowToursPrepared",SNOW_TRAILS_PREPARED:"snowTrailsPrepared"})},iIuG:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("tb-w-loader",{directives:[{name:"show",rawName:"v-show",value:!t.loaderSuspense,expression:"!loaderSuspense"}],attrs:{colibri:""}}),t._v(" "),s("transition",{attrs:{name:"fade"}},[s("div",{directives:[{name:"show",rawName:"v-show",value:t.loaderSuspense,expression:"loaderSuspense"}]},[t.winterSportsStatistics&&t.article?s("tb-w-ski-area-detail-wintersports",{attrs:{article:t.article,"wintersports-statistics":t.winterSportsStatistics,"hide-headline":""}}):t._e()],1)])],1)};i._withStripped=!0;var r=s("m5nq"),a=s("Mob5"),o={props:{id:{type:String,required:!0}},data:()=>({article:null,winterSportsStatistics:null,loaderSuspense:!1}),methods:{async fetchArticle(t){this.article=null;try{const e=await this.articleRepository.fetch(t,{language:this.$store.state.language},r.a.VERSION_2);this.article=e.payload}catch(t){console.error(t)}},async fetchWinterSportsStatistics(t){this.winterSportsStatistics=null;const e=[a.a.SNOW_TRANSPORTATION_OPEN,a.a.SNOW_SLOPES_PREPARED,a.a.SNOW_TOURS_PREPARED,a.a.SNOW_TRAILS_PREPARED];try{const s=await this.statisticsRepository.fetch(t,{types:e},r.a.VERSION_2);this.winterSportsStatistics=s.payload}catch(t){console.error(t)}},async fetchArticleAndWintersportStatistic(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id;const e=[];this.articleRepository&&this.statisticsRepository&&e.push(this.fetchArticle(t),this.fetchWinterSportsStatistics(t)),await Promise.all(e)}},watch:{article(){this.article&&setTimeout(()=>{this.loaderSuspense=!0},300)},id:{immediate:!0,handler(t){this.fetchArticleAndWintersportStatistic(t)}}}},n=s("KHd+"),c=Object(n.a)(o,i,[],!1,null,null,null);c.options.__file="node_modules/@newland/toubiz-widget/src/routes/wintersport-statistic.vue";e.default=c.exports}}]);