import { SignalResponse, SignalResponseOmfattning, SignalResponseType } from './api/signal.response.model';

export interface Signal {
  genomforandereferens: number;
  type: SignalResponseType;
  omfattning: SignalResponseOmfattning;
  omfattningPercent: number;
  startDate: string;
  status?: string;
  motivation?: string;
}

export function mapResponseToSignal(data: SignalResponse): Signal {
  return { motivation: data.motivation, status: data.status, ...data.content };
}
