import { createStore } from "vuex";

console.log(import.meta.env.VITE_PROJECT_ENV);
let baseurl = import.meta.env.VITE_BASEURL;

const store = createStore({
  state: {
    isLogin: false,
    firstTitle: "",
    secondTitle: "",
    currentMenuItem: "/cargoOwnerManage/cargoOwnerList",
    baseurl,
  },
  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;
