import axios from 'axios';

// 公共路径
const urlPrefix = '/api/v1/bpms-workbench';

// 我的组件
export function getMyComponentList(params) {
  return axios.get(`${urlPrefix}/componentBase/list`, { params });
}

export function getTagList() {
  return axios.get(`${urlPrefix}/componentBase/tags`);
}

export function compProjectValidate(projectId) {
  return axios.post(`${urlPrefix}/componentBase/validate?projectId=${projectId}`);
}

export function compSubmit(params) {
  return axios.post(`${urlPrefix}/componentBase/submit`, params);
}

export const remove = (ids) => {
  return axios.post(`${urlPrefix}/componentBase/remove?ids=${ids}`);
};