(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[235],{jbs3:function(i,t,e){"use strict";e.r(t);var l=function(){var i=this,t=i.$createElement,e=i._self._c||t;return i.popupOpenState?e("tb-w-map-info-window-mapbox",{attrs:{title:i.articleMini.name,"category-title":i.categoryTitle,"image-url":i.imageUrl,"image-alt":i.imageAlt,description:i.description,"tour-duration":i.tourDuration,"tour-distance":i.tourDistance,"article-opening-times":i.openingTimes,url:i.url,classification:i.classification,"hide-details-button":i.hideDetailsButton}}):i._e()};l._withStripped=!0;var a={name:"TbWMapboxPopupArticleQuery",props:{articleMini:{type:Object,required:!0},hideDetailsButton:{type:Boolean,default:!1}},inject:{popup:{default:null}},data:()=>({include:["additionalAddress","awards","capacity","classifications","client","contactInformation","emails","fieldValues","fieldBlueprints","files","geometryForStages","languages","links","media","mainImage","openingTimes","permissions","phoneNumbers","seo","tags","tourVariants"],popupOpenState:!1,article:null}),mounted(){this.$nextTick(()=>{this.popup.on("open",()=>{this.popupOpenState=!0})}),this.$nextTick(()=>{this.popup.on("close",()=>{this.popupOpenState=!1})})},methods:{async fetchArticleDetails(){const i=await this.articleRepository.list({filter:{id:this.articleMini.id,clientIncludingManaged:"current"},language:this.$store.state.language,unlicensed:1,include:this.include});this.article=i.payload[0]}},watch:{popupOpenState(i){i&&this.fetchArticleDetails()}},computed:{tourDuration(){var i,t,e,l;return null!==(i=null==this||null===(t=this.article)||void 0===t||null===(e=t.tour)||void 0===e||null===(l=e.trackInformation)||void 0===l?void 0:l.duration)&&void 0!==i?i:0},tourDistance(){var i,t,e,l;return null!==(i=null==this||null===(t=this.article)||void 0===t||null===(e=t.tour)||void 0===e||null===(l=e.trackInformation)||void 0===l?void 0:l.distance)&&void 0!==i?i:0},url(){return this.buildUrl({name:"article.detail",params:{id:this.articleMini.id}})},classification(){var i,t,e,l,a;return null!==(i=this.article)&&void 0!==i&&null!==(t=i.primaryCategory)&&void 0!==t&&null!==(e=t.rootline)&&void 0!==e&&e.includes("32b05798-f54c-462d-9f58-a39899c85ef6")&&null!==(l=this.article)&&void 0!==l&&null!==(a=l.classifications)&&void 0!==a&&a.length?this.article.classifications[0]:null},imageUrl(){var i,t;return null!==(i=this.article)&&void 0!==i&&null!==(t=i.mainImage)&&void 0!==t&&t.updatedAt?this.buildImageUri(this.article.id,"article"):null},imageAlt(){var i;return null!==(i=this.article)&&void 0!==i&&i.media&&this.article.media[0]?this.article.media[0].altText:null},description(){var i,t;return this.article&&null!==(i=this.article)&&void 0!==i&&i.abstract?null===(t=this.article)||void 0===t?void 0:t.abstract:null},openingTimes(){return this.article&&this.article.openingTimes?this.article.openingTimes:null},categoryTitle(){var i,t;return this.article&&null!==(i=this.article.primaryCategory)&&void 0!==i&&i.name?null===(t=this.article.primaryCategory)||void 0===t?void 0:t.name:null}}},n=e("KHd+"),r=Object(n.a)(a,l,[],!1,null,null,null);r.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-w-mapbox-popup-article-query.vue";t.default=r.exports}}]);