import { defineStore, acceptHMRUpdate } from 'pinia';





export const useSocketioStore = defineStore('socketio', {
  state: () => {
    return {



//      nextLocation: null as NextLocation | null,
//      messageList: [''] as string[],

      leafletZoom: 10 as number,

    };
  },
  getters: {
/*    sockState: (state) => state.sockConnected,
    deviceState: (state) => state.deviceConnected,
    lMarkerLatLng: (state): [number, number] => {
      if (
        state.currentLocation == null ||
        !state.currentLocation.latitude ||
        !state.currentLocation.longitude
      ) {
        return [0, 0];
      }
      return [state.currentLocation.latitude, state.currentLocation.longitude];
    },
    lCenter(): [number, number] {
      return this.lMarkerLatLng;
    },
    lZoom: (state): number => state.leafletZoom,
    */

  },
  actions: {

















  },
});

if (import.meta.hot) {
  import.meta.hot.accept(acceptHMRUpdate(useSocketioStore, import.meta.hot));
}
