import { defineStore } from "pinia";

export const useLocationStore = defineStore("location", {
  state() {
    return {
      latitude: 0, // 纬度
      longitude: 0, // 经度
    };
  },

  actions: {
    setLocationData(data) {
      this.latitude = data.latitude;
      this.longitude = data.longitude;
    },
  },

  unistorage: true,
});
