import { GetterTree } from 'vuex'
import { State } from './index'
import { RootState } from '~/store/index'

export type Getters<S = State> = {
  data(state: S, key: string): any
}

export const getters: GetterTree<State, RootState> & Getters = {
  data: (state, key: string) => {
    return state.data.get(key)
  },
}
