import { useLocalStore } from 'mobx-react-lite';
import { axios, Choerodon } from '@choerodon/boot';
export default function useStore() {
  return useLocalStore(function () {
    return {
      isEmpty: false,
      setIsEmpty: function setIsEmpty(flag) {
        this.isEmpty = flag;
      },

      get getIsEmpty() {
        return this.isEmpty;
      },

      checkCreate: function checkCreate(projectId, appServiceId, type) {
        return axios.get("/devops/v1/projects/".concat(projectId, "/member-check/").concat(appServiceId, "?type=").concat(type || 'BRANCH_CREATE'));
      }
    };
  });
}