import api from './api';

export const ideaService = {
  getIdeas: (limit = 10, offset = 0) => api.get('/ideas', { params: { limit, offset } }),
  createIdea: (data) => api.post('/ideas', data),
  getIdea: (id) => api.get(`/ideas/${id}`),
  updateIdea: (id, data) => api.put(`/ideas/${id}`, data),
  deleteIdea: (id) => api.delete(`/ideas/${id}`),
  addGenerationToIdea: (ideaId, generationId) => api.post(`/ideas/${ideaId}/generations/${generationId}`),
  removeGenerationFromIdea: (ideaId, generationId) => api.delete(`/ideas/${ideaId}/generations/${generationId}`),
  getIdeaGenerations: (ideaId, limit = 10, offset = 0) => api.get(`/ideas/${ideaId}/generations`, { params: { limit, offset } })
};
