import type RouteStopSymbols from "./RouteStopSymbols.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { PointSymbolUnion, PolygonSymbolUnion, LineSymbolUnion } from "../../symbols/types.js";
import type { CIMSymbolProperties } from "../../symbols/CIMSymbol.js";
import type { LineSymbol3DProperties } from "../../symbols/LineSymbol3D.js";
import type { SimpleLineSymbolProperties } from "../../symbols/SimpleLineSymbol.js";
import type { PointSymbol3DProperties } from "../../symbols/PointSymbol3D.js";
import type { SimpleMarkerSymbolProperties } from "../../symbols/SimpleMarkerSymbol.js";
import type { PictureMarkerSymbolProperties } from "../../symbols/PictureMarkerSymbol.js";
import type { PolygonSymbol3DProperties } from "../../symbols/PolygonSymbol3D.js";
import type { PictureFillSymbolProperties } from "../../symbols/PictureFillSymbol.js";
import type { SimpleFillSymbolProperties } from "../../symbols/SimpleFillSymbol.js";
import type { RouteStopSymbolsProperties } from "./RouteStopSymbols.js";

export interface RouteSymbolsProperties {
  /**
   * The default symbol for [direction lines](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#directionLines).
   *
   * @default { type: "simple-line", color: [0, 122, 194], width: 6 }
   */
  directionLines?: ((SimpleLineSymbolProperties & { type: "simple-line" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null;
  /**
   * The default symbol for [direction points](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#directionPoints).
   *
   * @default { type: "simple-marker", color: [255, 255, 255], size: 6, outline: { color: [0, 122, 194], width: 2 } }
   */
  directionPoints?: ((PictureMarkerSymbolProperties & { type: "picture-marker" }) | (SimpleMarkerSymbolProperties & { type: "simple-marker" }) | (PointSymbol3DProperties & { type: "point-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null;
  /**
   * The default symbol for [point barriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#pointBarriers).
   *
   * @default { type: "simple-marker", style: "x", size: 10, outline: { color: [255, 0, 0], width: 3 } }
   */
  pointBarriers?: ((PictureMarkerSymbolProperties & { type: "picture-marker" }) | (SimpleMarkerSymbolProperties & { type: "simple-marker" }) | (PointSymbol3DProperties & { type: "point-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null;
  /**
   * The default symbol for [polygon barriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#polygonBarriers).
   *
   * @default { type: "simple-fill", color: [255, 170, 0, 0.6], outline: { width: 7.5, color: [255, 0, 0, 0.6] } }
   */
  polygonBarriers?: ((SimpleFillSymbolProperties & { type: "simple-fill" }) | (PictureFillSymbolProperties & { type: "picture-fill" }) | (PolygonSymbol3DProperties & { type: "polygon-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null;
  /**
   * The default symbol for [polyline Barriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#polylineBarriers).
   *
   * @default { type: "simple-line", color: [255, 85, 0, 0.7], width: 7.5 }
   */
  polylineBarriers?: ((SimpleLineSymbolProperties & { type: "simple-line" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null;
  /**
   * The default symbol for the overall [route](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#routeInfo).
   *
   * @default { type: "simple-line", color: [20, 89, 127], width: 8 }
   */
  routeInfo?: ((SimpleLineSymbolProperties & { type: "simple-line" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null;
  /** The default symbol for [stop](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#stops). */
  stops?: RouteStopSymbolsProperties | null;
}

/**
 * RouteSymbols contains a set of symbols that will be used by [RouteLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/) to symbolize
 * new stops, barriers and directions.
 *
 * An instance of RouteSymbols can be retrieved from or assigned to the
 * [RouteLayer.defaultSymbols](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#defaultSymbols) property of a `RouteLayer`.
 * This property determines the symbol used when a new
 * [Stop](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Stop/),
 * [PointBarrier](https://developers.arcgis.com/javascript/latest/references/core/rest/support/PointBarrier/),
 * [PolylineBarrier](https://developers.arcgis.com/javascript/latest/references/core/rest/support/PolylineBarrier/) or
 * [PolygonBarrier](https://developers.arcgis.com/javascript/latest/references/core/rest/support/PolygonBarrier/) is added to a RouteLayer.
 * This `defaultSymbols` property is also used to symbolize the results of a solved routes, specifically the network
 * objects stored in the
 * [RouteLayer.stops](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#stops),
 * [RouteLayer.pointBarriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#pointBarriers),
 * [RouteLayer.polylineBarriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#polylineBarriers),
 * [RouteLayer.polygonBarriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#polygonBarriers),
 * [RouteLayer.directionPoints](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#directionPoints),
 * [RouteLayer.directionLines](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#directionLines), and
 * [RouteLayer.routeInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#routeInfo) properties.
 *
 * Whilst it is possible to assign any symbol (of appropriate dimensionality) to any property you should be cognisant of
 * the end user's environment. For example, it is not advisable to assign a [3D symbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol3D/)
 * if it is anticipated that the route layer will be used in [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/). Similarly
 * [CIM symbols](https://developers.arcgis.com/javascript/latest/references/core/symbols/CIMSymbol/) are not supported in [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) nor the
 * classic MapViewer.
 *
 * To not show or hide a particular network feature, set the associated property to null.
 *
 * @since 4.24
 * @see [RouteLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/)
 * @example
 * // When a route is solved, display the direction lines with a thick cyan line and hide both diection points and the
 * // overall route line.
 * const layer = new RouteLayer({
 *   defaultSymbols: {
 *    directionLines: {
 *      type: "simple-line",
 *      color: [105, 220, 255],
 *      width: 7,
 *      cap: "round",
 *      join: "round"
 *    },
 *    directionPoints: null,
 *    routeInfo: null
 *   }
 * });
 */
export default class RouteSymbols extends JSONSupport {
  constructor(properties?: RouteSymbolsProperties);
  /**
   * The default symbol for [direction lines](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#directionLines).
   *
   * @default { type: "simple-line", color: [0, 122, 194], width: 6 }
   */
  get directionLines(): LineSymbolUnion | null | undefined;
  set directionLines(value: ((SimpleLineSymbolProperties & { type: "simple-line" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null | undefined);
  /**
   * The default symbol for [direction points](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#directionPoints).
   *
   * @default { type: "simple-marker", color: [255, 255, 255], size: 6, outline: { color: [0, 122, 194], width: 2 } }
   */
  get directionPoints(): PointSymbolUnion | null | undefined;
  set directionPoints(value: ((PictureMarkerSymbolProperties & { type: "picture-marker" }) | (SimpleMarkerSymbolProperties & { type: "simple-marker" }) | (PointSymbol3DProperties & { type: "point-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null | undefined);
  /**
   * The default symbol for [point barriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#pointBarriers).
   *
   * @default { type: "simple-marker", style: "x", size: 10, outline: { color: [255, 0, 0], width: 3 } }
   */
  get pointBarriers(): PointSymbolUnion | null | undefined;
  set pointBarriers(value: ((PictureMarkerSymbolProperties & { type: "picture-marker" }) | (SimpleMarkerSymbolProperties & { type: "simple-marker" }) | (PointSymbol3DProperties & { type: "point-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null | undefined);
  /**
   * The default symbol for [polygon barriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#polygonBarriers).
   *
   * @default { type: "simple-fill", color: [255, 170, 0, 0.6], outline: { width: 7.5, color: [255, 0, 0, 0.6] } }
   */
  get polygonBarriers(): PolygonSymbolUnion | null | undefined;
  set polygonBarriers(value: ((SimpleFillSymbolProperties & { type: "simple-fill" }) | (PictureFillSymbolProperties & { type: "picture-fill" }) | (PolygonSymbol3DProperties & { type: "polygon-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null | undefined);
  /**
   * The default symbol for [polyline Barriers](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#polylineBarriers).
   *
   * @default { type: "simple-line", color: [255, 85, 0, 0.7], width: 7.5 }
   */
  get polylineBarriers(): LineSymbolUnion | null | undefined;
  set polylineBarriers(value: ((SimpleLineSymbolProperties & { type: "simple-line" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null | undefined);
  /**
   * The default symbol for the overall [route](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#routeInfo).
   *
   * @default { type: "simple-line", color: [20, 89, 127], width: 8 }
   */
  get routeInfo(): LineSymbolUnion | null | undefined;
  set routeInfo(value: ((SimpleLineSymbolProperties & { type: "simple-line" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (CIMSymbolProperties & { type: "cim" })) | null | undefined);
  /** The default symbol for [stop](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/#stops). */
  get stops(): RouteStopSymbols | null | undefined;
  set stops(value: RouteStopSymbolsProperties | null | undefined);
}