import { apiClient } from "./client";
import { API_ENDPOINTS } from "../config/api";

export interface FitnessProfileData {
    userId: string;
    height: string;
    weight: string;
    age: string;
    gender: "male" | "female" | "other";
    activityLevel: "sedentary" | "light" | "moderate" | "active" | "very_active";
    fitnessGoals: string[];
    exerciseHabits: string;
    dietHabits: string;
    medicalConditions: string;
}

export const profileApi = {
    createFitnessProfile: async (
        data: FitnessProfileData,
        token: string,
    ): Promise<void> => {
        try {
            await apiClient.post(API_ENDPOINTS.PROFILE.FITNESS, data, {
                headers: { Authorization: `Bearer ${token}` },
            });
        } catch (error) {
            throw error;
        }
    },
};
