import { MutationTree } from 'vuex'

const state = () => ({
  projectId: null as string | null,
  dockSns: null as string | null,
  snList: [] as string[],
  projectName: '' as string
})
export type RootStateType = ReturnType<typeof state>
const mutations: MutationTree<RootStateType> = {
  SET_PROJECT_ID (state, projectId: string) {
    state.projectId = projectId
  },

  SET_DOCK_SN (state, dockSns: string) {
    state.dockSns = dockSns
  },

  SET_SN_LIST (state, snList: string[]) {
    state.snList = snList
  },
  SET_PROJECT_NAME (state, projectName: string) {
    state.projectName = projectName
  }
}
export default {
  state,
  mutations
}
