@visitscotland/component-library
Version:
VisitScotland Component Library
1 lines • 1.15 kB
JavaScript
;(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[7539],{79920:function(e,t,n){var a=n(17527),c=(0,n(48086).defineStore)("map",(function(){var e=(0,a.ref)([]),t=(0,a.ref)([]),n=(0,a.ref)(null),c=(0,a.ref)(null),i=(0,a.ref)(null);return{maps:e,activeSubcatFilters:t,selectedSubCategory:n,activeMarkerPos:c,activePlace:i,addMapInstance:function(t){e.value.push({id:t.id,filters:t.filters,places:t.places,activePins:t.activePins,hovered:"",activePlace:null})},setHoveredPlace:function(t){e.value.forEach((function(e){e.id===t.mapId&&(e.hovered=t.hoveredFeature)}))},setActivePlace:function(t){e.value.forEach((function(e){e.id===t.mapId&&(e.activePlace=t.activeFeature)}))},setActiveSubcatFilters:function(e){t.value=e},setSelectedSubcat:function(e){n.value=e},setActiveMarkerPos:function(e){c.value=e},getMapById:function(t){return e.value.find((function(e){return e.id===t}))},getHoveredStop:function(t){return e.value.find((function(e){return e.id===t})).hovered},getActivePlace:function(t){return e.value.find((function(e){return e.id===t})).activePlace}}}));t.A=c}}]);