import { Type } from "@sinclair/typebox";
import type { Static } from "@sinclair/typebox";

export enum Attribute {
    Strength = "Strength",
    Power = "Power",
    Endurance = "Endurance",
    Agility = "Agility",
}

export enum Activity {
    BackSquat = "BackSquat",
    Deadlift = "Deadlift",
    BenchPress = "BenchPress",
    Run = "Run",
    BroadJump = "BroadJump",
    ConeDrill = "ConeDrill",
}

export enum Gender {
    Male = "Male",
    Female = "Female",
}

export const MetricsSchema = Type.Object({
    age: Type.Number(),
    weight: Type.Number(),
    gender: Type.Enum(Gender),
});

export const PlayerSchema = Type.Object({
    name: Type.Optional(Type.String()),
    metrics: MetricsSchema,
});

export const ActivityPerformanceSchema = Type.Object({
    activity: Type.Enum(Activity),
    performance: Type.Number(),
});

export type StandardUnit = "ms" | "cm" | "kg";

export type Metrics = Static<typeof MetricsSchema>;
export type Player = Static<typeof PlayerSchema>;
export type ActivityPerformance = Static<typeof ActivityPerformanceSchema>;
