import api from './api';

export const projectAPI = {
  getList: (params) => api.get('/projects', { params }),

  getDetail: (id) => api.get(`/projects/${id}`),

  create: (data) => api.post('/projects', data),

  update: (id, data) => api.put(`/projects/${id}`, data),

  delete: (id) => api.delete(`/projects/${id}`),

  getStatistics: (params) => api.get('/projects/statistics', { params }),

  getGroupStatistics: (params) => api.get('/projects/statistics/group', { params }),

  getTimelineStatistics: (params) => api.get('/projects/statistics/timeline', { params }),

  export: (params) => api.get('/projects/export', { params, responseType: 'blob' }),
};
