(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[244],{dNU7:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this.$createElement,e=this._self._c||t;return null===this.article?e("tb-w-loader"):e("div",[e("tb-w-article-detail",{staticClass:"tb-w-article-detail",attrs:{article:this.article}})],1)};a._withStripped=!0;var s=i("+cer");const l=["additionalAddress","awards","capacity","classifications","client","contactInformation","emails","fieldValues","fieldBlueprints","files","geometryForStages","languages","links","media","openingTimes","permissions","phoneNumbers","seo","tags","tourVariants"];var r={components:{TbWArticleDetail:s.default},props:{id:{type:String,required:!0}},data:()=>({article:null}),methods:{fetchArticle:async function(t=this.id){var e,i,a,s;this.article=null;const r=await this.articleRepository.fetch(t,{include:l,language:this.$store.state.language});this.article=r.payload,await this.articleRepository.fetch(this.id+"/relatedArticles",{language:this.$store.state.language,include:["geometry","classifications","mainImage","capacity"]}).then(t=>this.$set(this.article,"relatedArticles",t.payload));const o=[];if(null!==(e=this.article.relatedArticles)&&void 0!==e&&e.tourRefreshmentPoints)for(const t of this.article.relatedArticles.tourRefreshmentPoints)o.push(this.articleRepository.fetch(t.id+"/openingTimes").then(e=>t.openingTimes=e.payload));if(null!==(i=this.article.relatedArticles)&&void 0!==i&&i.tourSights)for(const t of this.article.relatedArticles.tourSights.slice(0,5))o.push(this.articleRepository.fetch(t.id+"/openingTimes").then(e=>t.openingTimes=e.payload));if(null!==(a=this.article.relatedArticles)&&void 0!==a&&a.tourAccommodations)for(const t of this.article.relatedArticles.tourAccommodations.slice(0,5))o.push(this.articleRepository.fetch(t.id+"/awards").then(e=>t.awards=e.payload));if(null!==(s=this.article.relatedArticles)&&void 0!==s&&s.areaContacts)for(const t of this.article.relatedArticles.areaContacts)o.push(this.articleRepository.fetch(t.id+"/openingTimes").then(e=>t.openingTimes=e.payload));await Promise.all(o),this.article.fieldValues instanceof Array&&0===this.article.fieldValues.length&&(this.article.fieldValues={})}},watch:{id:{immediate:!0,handler(t){this.fetchArticle(t)}}}},o=i("KHd+"),c=Object(o.a)(r,a,[],!1,null,null,null);c.options.__file="node_modules/@newland/toubiz-widget/src/routes/article-detail.vue";e.default=c.exports}}]);