import { useStore } from '@/store/root' import Shop from '@/utils/Class/Shop' import { useRouter } from 'vue-router' export const useFacilityNav = () => { const store = useStore() const router = useRouter() function handleFacility(name, floorOrder, floorName, logoPath, yaxis, isFacility) { const shop = new Shop(name, floorOrder, floorName, logoPath, yaxis, isFacility) store.SET_SHOP(shop) } function _handleFacility(item) { store.showSearch && store.SET_SHOW_SEARCH(false) store.showVoice && store.SET_SHOW_VOICE(false) store.showDetail && store.SET_SHOW_DETAIL(false) window.Map_QM.bounceIcon({ type: item.type }) router.push('/guide') } return { _handleFacility } }