import { ref, reactive } from 'vue'

// Coin Seller 全局状态管理
const coinSellerStore = reactive({
  selectedUser: {
    id: '',
    name: ''
  }
})

// 设置选中的用户
export function setSelectedUser(user) {
  coinSellerStore.selectedUser = user
}

// 获取选中的用户
export function getSelectedUser() {
  return coinSellerStore.selectedUser
}

// 清除选中的用户
export function clearSelectedUser() {
  coinSellerStore.selectedUser = {
    id: '',
    name: ''
  }
}
