import {
  Anstallningsform,
  EducationLength,
  EducationLevel,
  MainOccupation,
  Omfattning,
  StillUnemployedReason,
} from '@msfa-models/slutredovisning.model';

export interface SlutredovisningRequestMainOccupationWorkDetails {
  yrkesomrade: string;
  yrkesgrupp: string;
  anstallningsform: Anstallningsform;
  otherExplanation: string;
  omfattning: Omfattning;
  omfattningPercent: number;
}

export interface SlutredovisningRequestMainOccupationWork {
  type: MainOccupation.Work;
  work: SlutredovisningRequestMainOccupationWorkDetails[];
}

export interface SlutredovisningRequestMainOccupationEducationDetails {
  educationLevel: EducationLevel;
  otherExplanation: string;
  educationLength: EducationLength;
  educationSpecification: string;
}

export interface SlutredovisningRequestMainOccupationEducation {
  type: MainOccupation.Education;
  education: SlutredovisningRequestMainOccupationEducationDetails;
}

export interface SlutredovisningRequestMainOccupationOtherDetails {
  otherExplanation: string;
}

export interface SlutredovisningRequestMainOccupationOther {
  type: MainOccupation.Other;
  other: SlutredovisningRequestMainOccupationOtherDetails;
}

export interface SlutredovisningRequestMainOccupationStillUnemployedDetails {
  reasonsGoalNotReached: StillUnemployedReason[];
  otherExplanation: string;
}

export interface SlutredovisningRequestMainOccupationStillUnemployed {
  type: MainOccupation.StillUnemployed;
  stillUnemployed: SlutredovisningRequestMainOccupationStillUnemployedDetails;
}

export type SlutredovisningRequestMainOccupationDetails =
  | SlutredovisningRequestMainOccupationWork
  | SlutredovisningRequestMainOccupationEducation
  | SlutredovisningRequestMainOccupationOther
  | SlutredovisningRequestMainOccupationStillUnemployed;

export interface SlutredovisningRequest {
  genomforandereferens: number;
  mainOccupation: SlutredovisningRequestMainOccupationDetails;
  activities: { id: string; whatHasBeenDone: string }[];
  progressDescription: string;
  nextStepDescription: string;
  otherInformation: string;
}
