import 'package:freezed_annotation/freezed_annotation.dart';

part 'workout_set.freezed.dart';
part 'workout_set.g.dart';

@freezed
abstract class WorkoutSet with _$WorkoutSet {
  const factory WorkoutSet({
    @Default(1) int setNumber,
    @Default(0) int targetPercentage,
    @Default(0.0) double targetWeightTotal,
    @Default(0.0) double plateWeight,
    @Default(0) int repsTarget,
    @Default(0) int repsActual,
    @Default(false) bool isAmrap,
    @Default(false) bool completed,
    int? rpe,
  }) = _WorkoutSet;

  factory WorkoutSet.fromJson(Map<String, dynamic> json) =>
      _$WorkoutSetFromJson(json);
}
