import { reactive } from "vue"
const store = reactive({
  mchInfo: {}, // 商户信息
  storeInfo: {}, // 门店信息
  appInfo: {}, // 应用信息
  bindMch: {}, // 商户绑定信息
  team: {}, //团队信息
  teamInfo: {}, //团队详情
  createINfo: {}, //创建辅助终端设备需要信息
  userState: {}, //注册状态
})

export default function () {
  const getStore = (key) => {
    return store[key]
  }

  const setStore = (key, value) => {
    store[key] = value
  }
  const clearItem = (key) => {
    store[key] = {}
  }
  return {
    getStore,
    setStore,
    clearItem,
  }
}
