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

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

export interface SlutredovisningFormDataMainOccupationWork {
  type: MainOccupation.Work;
  work: SlutredovisningFormDataMainOccupationWorkDetails[];
}

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

export interface SlutredovisningFormDataMainOccupationEducation {
  type: MainOccupation.Education;
  education: SlutredovisningFormDataMainOccupationEducationDetails;
}

export interface SlutredovisningFormDataMainOccupationOtherDetails {
  otherExplanation: string;
}

export interface SlutredovisningFormDataMainOccupationOther {
  type: MainOccupation.Other;
  other: SlutredovisningFormDataMainOccupationOtherDetails;
}

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

export interface SlutredovisningFormDataMainOccupationStillUnemployed {
  type: MainOccupation.StillUnemployed;
  stillUnemployed: SlutredovisningFormDataMainOccupationStillUnemployedDetails;
}

export interface SlutredovisningFormDataMainOccupationChangeVendor {
  type: MainOccupation.ByteTillNyLeverantorIRustaOchMatcha;
}

export type SlutredovisningFormDataMainOccupationDetails =
  | SlutredovisningFormDataMainOccupationWork
  | SlutredovisningFormDataMainOccupationEducation
  | SlutredovisningFormDataMainOccupationOther
  | SlutredovisningFormDataMainOccupationChangeVendor
  | SlutredovisningFormDataMainOccupationStillUnemployed;

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