// Auto-generated by scripts/build-engines.mjs for slug "tdee-calculator".
// Schema: https://aifithub.io/contracts/tdee-calculator.json

/** Maintenance calories (TDEE): Mifflin-St Jeor BMR × activity factor, with the other BMR formulas for comparison, daily calories for maintain / cut (−500) / lean gain (+300), and an optional training-day vs rest-day split of the same weekly total. */
export interface Input {
  /** Sex constant in the BMR equations. Default: "male". */
  sex?: "male" | "female";
  /** Age in years; the equations were built on adults. Unit: years. Range: 1 to 120. Default: 30. */
  age?: number;
  /** Body weight in kilograms. Unit: kg. Range: 1 to 650. Default: 80. */
  weight_kg?: number;
  /** Height in centimetres. Unit: cm. Range: 30 to 275. Default: 180. */
  height_cm?: number;
  /** Activity factor: sedentary 1.2, light 1.375, moderate 1.55, very 1.725, athlete 1.9. Default: "moderate". */
  activity_level?: "sedentary" | "light" | "moderate" | "very" | "athlete";
  /** Optional body fat in percent (20 = 20%); adds Katch-McArdle to the formula comparison. Omit or 0 if unknown. Unit: percent. Range: 0 to 69.9. Default: 0. */
  body_fat_percent?: number;
  /** Optional training days per week (whole number 1–7) to split the weekly total into training-day and rest-day calories. Omit or 0 for no split. Unit: days/week. Range: 0 to 7. Default: 0. */
  training_days_per_week?: number;
}

export interface Output {
  /** Basal metabolic rate, kcal/day (Mifflin-St Jeor). */
  bmr?: number;
  /** Maintenance calories, kcal/day (Mifflin-St Jeor BMR × activity factor). */
  tdee?: number;
  /** Activity multiplier used. */
  activityFactor?: number;
  /** { min, max } TDEE across the formulas, kcal/day. */
  tdeeRange?: { "min"?: number; "max"?: number };
  /** Array of { name, bmr, tdee } per formula (Mifflin-St Jeor, Harris-Benedict revised, WHO/FAO/UNU, Katch-McArdle when body fat is given). */
  formulas?: Array<{ "name"?: string; "bmr"?: number; "tdee"?: number }>;
  /** { maintain, cut (TDEE − 500), leanGain (TDEE + 300) }, kcal/day. */
  goalCalories?: { "maintain"?: number; "cut"?: number; "leanGain"?: number };
  /** Training-day and rest-day calories with the same weekly total, or null. */
  weeklyBreakdown?: unknown;
  /** Cautions (activity level vs training days, cut below 1,200/1,500 kcal, under 18). */
  warnings?: Array<unknown>;
  [key: string]: unknown;
}

/** Throws an Error naming the field when an input is unknown, mistyped or out of range. */
export declare function compute(input?: Input): Output;
