import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const userInfoStore = defineStore({
  id: 'user',
  state: () => {
    return {
      user: {}
    }
  },
  actions: {
    setUserInfo(user) {
      this.user = user
    }
  }
})

export const userCurrentRole = defineStore({
  id: 'userCurrentRole',
  state: () => {
    return {
      CurrentRole: ""
    }
  },
  actions: {
    setUserCurrentRole(CurrentRole) {
      this.CurrentRole = CurrentRole
    }
  }
})

export const pageGotype = defineStore({
  id: 'pageGotype',
  state: () => {
    return {
      gotype: ""
    }
  },
  actions: {
    setpageType(gotype) {
      this.gotype = gotype
    }
  }
})

export const userCurrent = defineStore({
  id: 'userCurrentRoleId',
  state: () => {
    return {
      userCurrent: {}
    }
  },
  actions: {
    setUserCurrent(userCurrent) {
      this.userCurrent = userCurrent
    }
  }
})
