import { SoftTargetType } from './../../core/model/soft-target-type';
import { SelectData } from "src/app/core/model/select-data.model";

export class MapAttack{
    id: number;
    city: string;
    country: string;
    date: string;
    latitude: number;
    longitude: number;
    modusOperandi: SelectData;
    softTargetTypes: SoftTargetType[];
}

export function getMapAttackDescription(attack: MapAttack){
    return "Město: <strong>" + attack.city + "</strong>" +
    "<br>Stát: <strong>" + attack.country + "</strong>" +
    "<br>Datum: <strong>" + attack.date + "</strong>" +
    (attack.softTargetTypes.length > 0 ? "<br>Typy měkkého cíle: " + attack.softTargetTypes.map((softTargetType: SoftTargetType) => softTargetType.softTargetType.label).join(", ") : "") +
    (attack.modusOperandi ? "<br>Modus Operandi: " + attack.modusOperandi.label : "");
}
