import type Point from "../../geometry/Point.js";
import type DirectionsString from "./DirectionsString.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { PointProperties } from "../../geometry/Point.js";
import type { DirectionsStringProperties } from "./DirectionsString.js";

export interface DirectionsEventProperties extends Partial<Pick<DirectionsEvent, "arriveTimeOffset">> {
  /** The date and time value indicating the arrival time at the Directions Event. */
  arriveTime?: (Date | number | string) | null;
  /** The point location of the stop. */
  geometry?: PointProperties | null;
  /** An array of [direction strings](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DirectionsString/). */
  strings?: DirectionsStringProperties[] | null;
}

/**
 * DirectionsEvent represent [DirectionsFeature.events](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DirectionsFeature/#events) for features in a
 * [DirectionsFeatureSet](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DirectionsFeatureSet/).
 *
 * @since 4.25
 * @see [DirectionsFeature.events](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DirectionsFeature/#events)
 * @see [DirectionsFeatureSet](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DirectionsFeatureSet/)
 */
export default class DirectionsEvent extends JSONSupport {
  constructor(properties?: DirectionsEventProperties);
  /** The date and time value indicating the arrival time at the Directions Event. */
  get arriveTime(): Date | null | undefined;
  set arriveTime(value: (Date | number | string) | null | undefined);
  /** The local time offset (in minutes) for the arrival time. */
  accessor arriveTimeOffset: number | null | undefined;
  /** The point location of the stop. */
  get geometry(): Point | null | undefined;
  set geometry(value: PointProperties | null | undefined);
  /** An array of [direction strings](https://developers.arcgis.com/javascript/latest/references/core/rest/support/DirectionsString/). */
  get strings(): DirectionsString[] | null | undefined;
  set strings(value: DirectionsStringProperties[] | null | undefined);
}