export enum ScormProgressType {
  UNKNOWN = 'UNKNOWN',
  INCOMPLETE = 'INCOMPLETE',
  COMPLETED = 'COMPLETED',
}

export enum ScormScoreType {
  PASSED = 'PASSED',
  FAILED = 'FAILED',
}

export enum CourseType {
  COURSE = 'COURSE',
  FOLDER = 'FOLDER',
}

export type ScormState = {
  registrationCompletion: ScormProgressType;
  registrationSuccess: ScormScoreType;
  score: number;
};

export type ScormLearner = {
  id: string | number;
  email: string;
  firstName: string;
  lastName: string;
};

export type ScormRegistration = {
  courseId: string;
  learner: ScormLearner;
  registrationId: string;
};

export type ScormLaunchLink = {
  expiry: number;
  redirectOnExitUrl: string;
};

export type Course = {
  activityId: string;
  courseLearningStandard: string;
  created: string;
  dispatched: boolean;
  id: string;
  rootActivity: any;
  tags: string[];
  title: string;
  updated: string;
  version: number;
  xapiActivityId: string;
  registerData?: ScormState;
};

export type CoursesType = {
  courses: Course[];
};

type Score = {
  scaled: number;
};

export type Registration = {
  id: string;
  instance: number;
  xapiRegistrationId: string;
  dispatchId: string;
  updated: string;
  registrationCompletion: ScormProgressType;
  registrationCompletionAmount: number;
  registrationSuccess: string;
  score: Score;
  totalSecondsTracked: number;
  firstAccessDate: string;
  lastAccessDate: string;
  completedDate: string;
  createdDate: string;
  tags: string[];
  learner: ScormLearner;
};

export type Registrations = {
  registrations: Registration[];
};

export type FiltersFormValues = {
  courseTheme: {
    [key: string]: boolean;
  };
};

export type Folder = {
  name: string;
  courses: Course[];
  color: string;
};
