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

/** Swim pace per 100 m and per 100 yd, total time or distance (pick which to solve with mode), plus a rough SWOLF estimate from typical stroke counts. */
export interface Input {
  /** pace: distance + time → pace; time: distance + target pace → time; distance: time + target pace → distance. Default: "pace". */
  mode?: "pace" | "time" | "distance";
  /** Stroke; only changes the SWOLF estimate (assumed strokes per 25 m). Default: "freestyle". */
  stroke_type?: "freestyle" | "backstroke" | "breaststroke" | "butterfly" | "im";
  /** Distance in distance_unit (default 1500). Unit: m. Range: 0 to ∞. Default: 1500. */
  distance_value?: number;
  /** Unit of distance_value; also the default pool_length_unit. Default: "m". */
  distance_unit?: "m" | "yd";
  /** Optional: number of pool lengths; with pool_length it replaces distance_value. Range: 0 to ∞. Default: 0. */
  laps?: number;
  /** Pool length in pool_length_unit (default 25); used for laps and the SWOLF estimate. Unit: m. Range: 0 to ∞. Default: 25. */
  pool_length?: number;
  /** Unit of pool_length (defaults to distance_unit). Default: "m". */
  pool_length_unit?: "m" | "yd";
  /** Total swim time in seconds (default 1800). Unit: s. Range: 0 to ∞. Default: 1800. */
  time_seconds?: number;
  /** Pace in seconds per 100 of target_pace_unit (default 120). Unit: s. Range: 0 to ∞. Default: 120. */
  target_pace_seconds?: number;
  /** Unit of target_pace_seconds. Default: "100m". */
  target_pace_unit?: "100m" | "100yd";
}

export interface Output {
  /** Distance, m (distanceYards in yd). */
  distanceMeters?: number;
  distanceYards?: number;
  /** Total time, s. */
  totalTimeSeconds?: number;
  /** Pace, seconds per 100 m. */
  pacePer100mSeconds?: number;
  /** Pace, seconds per 100 yd. */
  pacePer100ydSeconds?: number;
  /** Rough SWOLF: seconds per length + assumed strokes per length. */
  swolfEstimate?: number;
  /** Generic band by absolute pace per 100 m (not individualised). */
  effortZone?: string;
  strokeType?: string;
  [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;
