import type DataLayer from "./DataLayer.js";
import type DirectionLine from "./DirectionLine.js";
import type DirectionPoint from "./DirectionPoint.js";
import type FeatureSet from "./FeatureSet.js";
import type NetworkFeatureSet from "./NetworkFeatureSet.js";
import type NetworkUrl from "./NetworkUrl.js";
import type PointBarrier from "./PointBarrier.js";
import type PolygonBarrier from "./PolygonBarrier.js";
import type PolylineBarrier from "./PolylineBarrier.js";
import type RouteInfo from "./RouteInfo.js";
import type Stop from "./Stop.js";
import type { TimeUnit, LengthUnit as CoreLengthUnit } from "../../core/units.js";

/**
 * An object describing the parameter values for the
 * {@link rest/support/interfaces#attributeParameterValues} property of
 * [RouteParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html), [ClosestFacilityParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ClosestFacilityParameters.html) and [ServiceAreaParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ServiceAreaParameters.html).
 */
export interface AttributeParameterValue {
  /** The name of the attribute. */
  attributeName: string;
  /** The name of the parameter associated with the restriction. A restriction can have one or more `parameterName` properties. */
  parameterName: string;
  /** The value for `parameterName`. */
  value: string | number | null;
}

export type MessageType = "informative" | "process-definition" | "process-start" | "process-stop" | "warning" | "error" | "empty" | "abort";

export type OutputLine = "none" | "straight" | "true-shape" | "true-shape-with-measure";

export type OutputPolygon = "none" | "simplified" | "detailed";

export type LengthUnit = CoreLengthUnit | "decimal-degrees" | "points" | "unknown";

export type GPLinearUnit = LengthUnit | "international-feet" | "international-inches" | "international-miles" | "international-nautical-miles" | "international-yards";

export type AreaUnit = "ares" | "hectares" | "international-acres" | "square-centimeters" | "square-decimeters" | "square-international-feet" | "square-international-inches" | "square-international-miles" | "square-international-yards" | "square-kilometers" | "square-meters" | "square-millimeters" | "square-us-feet" | "square-us-inches" | "square-us-miles" | "square-us-yards" | "unknown" | "us-acres";

export type GeometryOperationLengthUnit = "feet" | "kilometers" | "meters" | "miles" | "nautical-miles" | "yards";

export type DirectionsDetail = "complete" | "complete-no-events" | "featuresets" | "instructions-only" | "standard" | "summary-only";

export type UTurnRestriction = "allow-backtrack" | "at-dead-ends-only" | "no-backtrack" | "at-dead-ends-and-intersections";

export type TimeOfDay = "not-used" | "start" | "end";

export type TravelDirection = "from-facility" | "to-facility";

export type TraveModeType = "automobile" | "truck" | "walk" | "other";

export type NetworkInput = DataLayer | FeatureSet | NetworkFeatureSet | NetworkUrl;

export type CurbApproach = "either-side-of-vehicle" | "right-side-of-vehicle" | "left-side-of-vehicle" | "no-u-turn";

export type LocationType = "stop" | "waypoint" | "break";

export type Status = "ok" | "not-located" | "network-element-not-located" | "element-not-traversable" | "invalid-field-values" | "not-reached" | "time-window-violation" | "not-located-on-closest";

export type BarrierType = "restriction" | "scaled-cost" | "added-cost";

export type FullEdge = "permit" | "restrict";

export type DirectionPointType = "arrive" | "bear-left" | "bear-right" | "boundary-crossing" | "central-fork" | "clockwise-roundabout" | "counter-clockwise-roundabout" | "depart" | "door" | "down-elevator" | "down-escalator" | "down-stairs" | "elevator" | "escalator" | "general-event" | "header" | "landmark" | "lane" | "left-fork" | "left-handed-u-turn" | "left-ramp" | "left-turn" | "left-turn-and-immediate-left-turn" | "left-turn-and-immediate-right-turn" | "off-ferry" | "on-ferry" | "pedestrian-ramp" | "restriction-violation" | "right-fork" | "right-handed-u-turn" | "right-ramp" | "right-turn" | "right-turn-and-immediate-left-turn" | "right-turn-and-immediate-right-turn" | "roundabout" | "scaled-cost-barrier-event" | "sharp-left" | "sharp-right" | "stairs" | "straight" | "time-zone-change" | "traffic-event" | "u-turn" | "up-elevator" | "up-escalator" | "up-stairs";

export type DirectionLineType = "unknown" | "segment" | "maneuver-segment" | "restriction-violation" | "scaled-cost-barrier" | "heavy-traffic" | "slow-traffic" | "moderate-traffic";

export type NetworkFeature = DirectionLine | DirectionPoint | PointBarrier | PolygonBarrier | PolylineBarrier | RouteInfo | Stop;

export type DirectionsStyleName = "campus" | "desktop" | "navigation";

export type SpatialRelationship = "intersects" | "contains" | "crosses" | "disjoint" | "envelope-intersects" | "index-intersects" | "overlaps" | "touches" | "within" | "relation";

export type GeometryType = "point" | "polyline" | "polygon" | "envelope" | "multipoint";

export type DirectionsStringType = "alt-name" | "arrive" | "branch" | "cross-street" | "cumulative-length" | "depart" | "estimated-arrival-time" | "exit" | "general" | "length" | "service-time" | "street-name" | "summary" | "time" | "time-window" | "toward" | "violation-time" | "wait-time";

export type NetworkAttributeAccerationUnit = "kilometers-per-hour" | "miles-per-hour";

export type NetworkAttributeUnknownUnit = "unknown";

export type NetworkAttributeUnit = NetworkAttributeAccerationUnit | TimeUnit | LengthUnit | NetworkAttributeUnknownUnit;

export type JobStatus = "job-cancelled" | "job-cancelling" | "job-deleted" | "job-deleting" | "job-timed-out" | "job-executing" | "job-failed" | "job-new" | "job-submitted" | "job-succeeded" | "job-waiting";

export type NetworkDate = Date | "now";