import { apiClient } from './client';
import type { TreatmentCatalogEntry } from '@/types/treatment-catalog';

export type TreatmentCatalogContext = 'appointment' | 'treatment';

export const treatmentCatalogApi = {
  list: async (
    context?: TreatmentCatalogContext,
  ): Promise<{ success: boolean; data: TreatmentCatalogEntry[] }> => {
    const response = await apiClient.get('/treatment-catalog', {
      params: context ? { context } : undefined,
    });
    return response.data;
  },
};
