import 'dart:ui';

import 'exercise_type.dart';

class WorkoutTree {
  int id;
  int parent;
  String name;
  String imageName;
  Color color;
  double fontSize;
  bool child;
  int exerciseTypeId;
  ExerciseType exerciseType;
  bool base;

  bool is1RM;
  bool selected = false;
  bool executed = false;
  String exerciseDetail;
  String nameEnglish;

  WorkoutTree(this.id, this.parent, this.name, this.imageName, this.color, this.fontSize, this.child,
      this.exerciseTypeId, this.exerciseType, this.base, this.is1RM, this.nameEnglish);

  Map<String, dynamic> toJson() {
    return {
      "id": id,
      "parent": parent,
      "name": name,
      "imageName": imageName,
      "color": color.toString(),
      "fontSize": fontSize.toString(),
      "child": child.toString(),
      "exerciseTypeId": exerciseTypeId.toString(),
      "base": base.toString(),
      "is1RM": is1RM.toString(),
    };
  }
}