import { api } from "../../api";
import type { WorkoutSetInput } from "../../types";

export const workoutApi = {
  active: api.activeWorkout,
  start: api.createWorkout,
  finish: api.finishWorkout,
  discard: api.discardWorkout,
  addItem: api.addWorkoutItem,
  addSet: api.addWorkoutSet,
  addSetBatch: (token: string, itemId: string, sets: WorkoutSetInput[]) => api.addWorkoutSetBatch(token, itemId, { sets }),
  updateSet: api.updateWorkoutSet,
  removeItem: api.removeWorkoutItem,
  removeSet: api.removeWorkoutSet,
};
