import { Position } from '../../Core';
import { POI, Venue } from '../../Venue';
import { EventType } from '../EventType';
import { View } from '../View';

/**
 * This interface represents events that occur due to user interacting with a mouse or pointing device on the map
 * or when the currently selected POI has changed.
 */
export interface POIEvent {
    /**
     * The event type currently fired.
     */
    readonly eventType: EventType;
    /**
     * The original MouseEvent (will only be defined for "poiclick", "poidblclick", "poimousedown", "poimouseup", "poimouseover" and "poimouseout" events)
     */
    readonly originalEvent?: MouseEvent;
    /**
     * The venue at the source of the event.
     */
    readonly venue: Venue;
    /**
     * The view at the source of the event (only for mouse or pointing device related events)
     */
    readonly view: View;
    /**
     * The POIs related to this event (only for mouse or pointing device related events and "selectedpoischange").
     */
    readonly pois: POI[];
    /**
     * Coordinates of the related point in the scene (only for mouse or pointing device related events and "selectedpoischange").
     */
    readonly coordinate?: Position;
}
