import { AvvikelseQuestionsResponse } from './api/avvikelse-question.response.model';

export interface AvvikelseQuestion {
  name: string;
  id: string;
  required: boolean;
}

export function mapResponseToAvvikelseQuestion(data: AvvikelseQuestionsResponse): AvvikelseQuestion {
  const { name, id, required } = data;

  return {
    name: name,
    id: id,
    required,
  };
}
