import { createStore } from "vuex";

const store = createStore({
  state: {
    isLogin: false,
    firstTitle: "",
    secondTitle: "",
    currentMenuItem: "/cargoOwnerManage/cargoOwnerList",
  },
  mutations: {
    changefirstTitle(state, text) {
      state.firstTitle = text;
    },
    changeTitleSecond(state, text) {
      state.secondTitle = text;
    },
    changeLogin(state, b) {
      state.isLogin = b;
    },
    setCurrentMenuItem(state, index) {
      state.currentMenuItem = index;
    },
  },
});

export default store;
