import { ref } from 'vue'
import { defineStore } from 'pinia'
import type { User, View } from '@/jfapi'

export const useDataStore = defineStore('data', () => {
  const data = ref<User>({
    Name: '',
    Host: '',
    Id: '',
  })
  // function setServerHost(host: string) {
  //   data.value.Host = host
  // }
  function setViews(views: View[]) {
    data.value.Views = views
  }
  // function setUser(id: string, name: string) {
  //   data.value.Id = id
  //   data.value.Name = name
  // }
  return { setViews }
})
