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

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

export interface SlutredovisningResponseMainOccupationWork {
  type: MainOccupation.Work;
  work: SlutredovisningResponseMainOccupationWorkDetails[];
}

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

export interface SlutredovisningResponseMainOccupationEducation {
  type: MainOccupation.Education;
  education: SlutredovisningResponseMainOccupationEducationDetails;
}

export interface SlutredovisningResponseMainOccupationOtherDetails {
  otherExplanation: string;
}

export interface SlutredovisningResponseMainOccupationOther {
  type: MainOccupation.Other;
  other: SlutredovisningResponseMainOccupationOtherDetails;
}

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

export interface SlutredovisningResponseMainOccupationStillUnemployed {
  type: MainOccupation.StillUnemployed;
  stillUnemployed: SlutredovisningResponseMainOccupationStillUnemployedDetails;
}

export type SlutredovisningResponseMainOccupationDetails =
  | SlutredovisningResponseMainOccupationWork
  | SlutredovisningResponseMainOccupationEducation
  | SlutredovisningResponseMainOccupationOther
  | SlutredovisningResponseMainOccupationStillUnemployed;

export interface SlutredovisningResponse {
  genomforandereferens: number;
  mainOccupation: SlutredovisningResponseMainOccupationDetails;
  activities: { id: string; whatHasBeenDone: string; name: string }[];
  progressDescription: string;
  nextStepDescription: string;
  otherInformation: string;
}
