import { ChangeDetectionStrategy , Component , Input } from '@angular/core' ; import { Event } from '../../event' ; import { ScenarioEvent } from './../../scenario-event' ; param event @ Component ( { changeDetection : ChangeDetectionStrategy . OnPush , selector : 'event-page-navigation' , styleUrls : [ './navigation.component.scss' ] , templateUrl : './navigation.component.html' } ) export class NavigationComponent { @ Input ( ) event : Event ; param event returns getKmlLink ( event ) { if ( event instanceof ScenarioEvent ) { return `/scenarios/feed/v1.0/detail/${ event . id }.kml` ; } else { return `/earthquakes/feed/v1.0/detail/${ event . id }.kml` ; } } param event returns hasImpact ( event ) { return event . hasProducts ( [ 'dyfi' , 'impact-text' , 'impact-link' , 'losspager' , 'ground-failure' , 'shakemap' ] ) ; } param event returns hasTechnical ( event ) { return event . hasProducts ( [ 'origin' , 'phase-data' , 'moment-tensor' , 'focal-mechanism' , 'finite-fault' , 'oaf' , 'shake-alert' ] ) ; } }