 import Foundation
 
 struct LogManager {
-    var collectionOfWorkoutLogs = OrderedDictionary<Int, (date: String, typeOfWorkout: TypeOfWorkout, workoutLog: WorkoutLog)>()
+    var collectionOfWorkoutLogs = OrderedDictionary<Int, (date: String, workoutLog: WorkoutLog)>()
     
     init(){
         

        let keys = collectionOfWorkoutLogs.keys.reverse()
        for i in keys {
            if let pastWorkoutType = collectionOfWorkoutLogs[i] {
                if pastWorkoutType.typeOfWorkout == typeOfWorkout {
                    return pastWorkoutType.workoutLog.workout.exercises
                }
            }

    
    mutating func addWorkoutLog(workoutLog: WorkoutLog) {
        let dateString = workoutLog.date
        
        if var lastKey = collectionOfWorkoutLogs.keys.last {
            lastKey += 1
            collectionOfWorkoutLogs[lastKey] = (dateString, workoutLog)
        } else {
            collectionOfWorkoutLogs[0] = (dateString,workoutLog)
        }
        
    }
