/*
 * @Author: sjl
 * @Date: 2023-05-08 19:23:23
 * @Descripttion:
 */
import { defineStore } from 'pinia';
import { store } from '/@/store';

interface MapState {
  sideMenu: boolean;
}
export const useMapStore = defineStore({
  id: 'map',
  state: (): MapState => ({
    sideMenu: true,
  }),
  getters: {
    getSideMenu(): boolean {
      return this.sideMenu;
    },
  },
  actions: {
    setSideMenu(): void {
      this.sideMenu = !this.sideMenu;
    },
  },
});
// Need to be used outside the setup
export function useMapStoreWithOut() {
  return useMapStore(store);
}
