// import API from "@/views/namespace-manage/api";
const commonStore = {
  state: {
    namespaceList: [],
    selectNamespace: {},
    userInfo: {},
    breadcrumb: []
  },
  mutations: {
    setNamespaceList(state, payload) {
      state.namespaceList = payload;
    },
    setSelectNamespace(state, payload) {
      state.selectNamespace = payload;
    },
    setUserInfo(state, payload) {
      state.userInfo = payload;
    },
    setBreadcrumb(state, payload) {
      state.breadcrumb = payload;
    }
  },
  actions: {
    // async getNameSpaceList({ commit }) {
    //   try {
    //     const params = {
    //       keyword: "",
    //       status: 1
    //     };
    //     const res = await API.getNameSpaceList(params);
    //     let { content } = res.data;
    //     if (0 !== res.code) {
    //       return;
    //     }
    //     commit("setNamespaceList", content || []);
    //   } catch (error) {
    //     console.log(error);
    //   }
    // }
  }
};

export { commonStore };
