import { DisabilityResponse } from './api/disability.response.model';

export interface Disability {
  code: string;
  title: string;
  description: string;
}

export function mapResponseToDisability(data: DisabilityResponse): Disability {
  const { kod, funktionsnedsattning, beskrivning } = data;
  return {
    code: kod,
    title: funktionsnedsattning,
    description: beskrivning,
  };
}
