import { ActivityResponse } from './api/activity-response.model';

export interface Activity {
  id: string;
  name: string;
  description?: string;
}

export interface SubActivity {
  subId: string;
  subName: string;
  subDescription: string;
}

export function mapResponseToActivity(data: ActivityResponse): Activity {
  const { aktivitets_id, aktivitets_namn } = data;

  return {
    id: aktivitets_id,
    name: aktivitets_namn
  }

}
