const state = {
  fontSize: localStorage.getItem("fontSize") || 1,
  selectedIndex: localStorage.getItem("selectedIndex") || "",
}
const getters = {
  fontSize: (state) => state.fontSize,
  selectedIndex: (state) => state.selectedIndex,
}
const mutations = {
  setFontSize(state, fontSize) {
    state.fontSize = fontSize
  },
  setSelectedIndex(state, selectedIndex) {
    state.selectedIndex = selectedIndex
    localStorage.setItem("selectedIndex", selectedIndex)
  },
}
const actions = {}
export default {
  state,
  getters,
  mutations,
  actions,
}
