(window.webpackJsonpNewland_Toubiz_Poi_Neos=window.webpackJsonpNewland_Toubiz_Poi_Neos||[]).push([[273,339,340],{0:function(t,i){},1:function(t,i){},ubwv:function(t,i,a){"use strict";a.r(i);var o=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{staticClass:"tb-w-event-detail-map"},[a("div",{staticClass:"tb-w-map-and-controls-wrapper relative"},[t.geoCoordinates?a("tb-w-mapbox-map",{attrs:{article:t.article,"all-markers-list":t.allMarkersList}}):t._e(),t._v(" "),a("tb-w-mapbox-custom-controls",[t.geoCoordinates?a("tb-w-mapbox-custom-control",{attrs:{"is-active":t.displayPublicTransport,disabled:t.publicTransportLoaded&&!t.publicTransportLocationsData.length},nativeOn:{click:function(i){return t.togglePublicTransport.apply(null,arguments)}}},[t._v("\n                "+t._s(t.$t("message.publicTransport"))+"\n                "),t.displayPublicTransport?a("span",{staticClass:"font-normal"},[t._v("\n                    ("+t._s(t.publicTransport.length)+")\n                ")]):t._e(),t._v(" "),t.loadingPublicTransport?a("tb-w-loader",{staticClass:"ml-1",attrs:{color:"white",inline:""}}):t._e()],1):t._e()],1)],1)])};o._withStripped=!0;var e=a("UjeN"),s=a("L2JU"),l=a("PxIQ"),r={name:"TbWEventDetailMap",props:{article:{type:Object,required:!0}},data:()=>({publicTransportTimeoutId:null,publicTransportTimeout:!1,publicTransportLocationsData:[],displayPublicTransport:!1,loadingPublicTransport:!1,publicTransportLoaded:!1}),computed:{...Object(s.e)("displayConfig",["activeMapMarkersInitial"]),publicTransport(){return this.displayPublicTransport?this.publicTransportLocationsData:[]},allMarkersList(){return[...this.publicTransport]},geoCoordinates(){return this.article.geocoordinates||this.article.latitude&&this.article.longitude?{latitude:this.article.latitude,longitude:this.article.longitude}:null},allAvailableToggles(){return{publicTransport:this.geoCoordinates}}},methods:{async togglePublicTransport(){this.displayPublicTransport=!this.displayPublicTransport,(!this.publicTransportLocationsData.length||this.displayPublicTransport&&this.publicTransportTimeout)&&(this.loadingPublicTransport=!0,await Object(e.a)(this.geoCoordinates.latitude,this.geoCoordinates.longitude).then(t=>{this.publicTransportLocationsData=t.Trias.ServiceDelivery.DeliveryPayload.LocationInformationResponse.Location,this.loadingPublicTransport=!1,this.publicTransportLoaded=!0,this.publicTransportTimeout=!1,clearTimeout(this.publicTransportTimeoutId)}).catch(t=>console.warn(t)),this.publicTransportTimeoutId=setTimeout(()=>{this.publicTransportTimeout=!0},6e4))},initialTogglesActivation(){this.activeMapMarkersInitial.forEach(t=>{this.allAvailableToggles[t]&&this.togglePublicTransport()})}},mounted(){this.initialTogglesActivation()},i18n:{fallbackLocale:"de",silentFallbackWarn:"undefined"==typeof window,messages:l.a}},n=a("KHd+"),c=Object(n.a)(r,o,[],!1,null,null,null);c.options.__file="node_modules/@newland/toubiz-widget/src/components/tb-w-event-detail-map.vue";i.default=c.exports}}]);