// HZ-ProjectHub-v2/frontend/src/shared/services/sectionService.js
import { apiClient } from './apiClient';

export const sectionService = {
  // GET /api/sections/list.php?project_id=X
  getSections: (projectId) => 
    apiClient(`/sections/list.php?project_id=${projectId}`),

  // POST /api/sections/create.php
  createSection: (sectionData) => 
    apiClient('/sections/create.php', { method: 'POST', body: sectionData }),

  // POST /api/sections/reorder.php
  reorderSections: (sectionsOrder) => 
    apiClient('/sections/reorder.php', { method: 'POST', body: { sections: sectionsOrder } }),

  // POST /api/sections/delete.php
  deleteSection: (sectionId) => 
    apiClient('/sections/delete.php', { method: 'POST', body: { id: sectionId } }),
};