import api from './api';

export const albumService = {
  getAlbums: (limit = 10, offset = 0) => api.get('/albums', { params: { limit, offset } }),
  createAlbum: (data) => api.post('/albums', data),
  getAlbum: (id) => api.get(`/albums/${id}`),
  updateAlbum: (id, data) => api.put(`/albums/${id}`, data),
  deleteAlbum: (id) => api.delete(`/albums/${id}`),
  addGenerationToAlbum: (albumId, generationId) => api.post(`/albums/${albumId}/generations/${generationId}`),
  removeGenerationFromAlbum: (albumId, generationId) => api.delete(`/albums/${albumId}/generations/${generationId}`),
  getAlbumGenerations: (albumId, limit = 10, offset = 0) => api.get(`/albums/${albumId}/generations`, { params: { limit, offset } })
};
