import { defineStore } from "pinia";

export const systemInfoStore = defineStore("systemInfoStore", {
  state: () => ({
    systemInfo: {
      batteryBarsHeight: 0,
      bottomSafeHeight: 0,
      system: {},
      address: {},
    },
  }),
  getters: {},
  actions: {
    setSystemInfo(data, name) {
      this.systemInfo[name] = data;
    },
  },
  persist: {
    storage: window.sessionStorage,
    paths: ["systemInfo"],
  },
});