import type Collection from "../core/Collection.js";
import type LineSymbol3DLayer from "./LineSymbol3DLayer.js";
import type PathSymbol3DLayer from "./PathSymbol3DLayer.js";
import type Symbol3D from "./Symbol3D.js";
import type { Symbol3DProperties } from "./Symbol3D.js";
import type { PathSymbol3DLayerProperties } from "./PathSymbol3DLayer.js";
import type { LineSymbol3DLayerProperties } from "./LineSymbol3DLayer.js";
import type { ReadonlyArrayOrCollection } from "../core/Collection.js";

export interface LineSymbol3DProperties extends Symbol3DProperties {
  /**
   * A Collection of [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) objects
   * used to visualize the graphic or feature. Individual symbol layers
   * may be autocast as objects and specified using the `type` property.
   */
  symbolLayers?: ReadonlyArrayOrCollection<((LineSymbol3DLayerProperties & { type: "line" }) | (PathSymbol3DLayerProperties & { type: "path" }))>;
}

export type SupportedSymbolLayerTypes = LineSymbol3DLayer | PathSymbol3DLayer;

/**
 * LineSymbol3D is used to render features with [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) geometry
 * in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). This symbol type is not supported in 2D
 * [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html).
 *
 * A LineSymbol3D must include at least one [symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3D.html#symbolLayers) for it to
 * render in the view. One or more of the following
 * [symbol layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) types must be used to define a 3D line symbol:
 *
 * [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) Type | Flat/Volumetric | Size Units | Example
 * ------------|-----------|------------|-----------
 * [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3DLayer.html)| flat | points | ![s3d-line](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-line-line.png)
 * [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PathSymbol3DLayer.html) | volumetric | meters | ![s3d-path](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-path-tube.png)
 *
 * See [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) and [Symbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html) to read
 * more general information about 3D symbols, symbol layers and how they relate to one another.
 *
 * @since 4.0
 * @see [Symbol Builder](https://developers.arcgis.com/javascript/latest/visualization/symbols-color-ramps/symbol-builder/)
 * @see [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html)
 * @see [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)
 * @see [ArcGIS blog - Working with icons, lines, and fill symbols](https://blogs.esri.com/esri/arcgis/2016/01/19/3d-visualization-working-with-icons-lines-and-fill-symbols/)
 * @see [ArcGIS blog - Working with objects, paths, and extrusion](https://blogs.esri.com/esri/arcgis/2016/01/25/3d-visualization-working-with-objects-paths-and-extrusion/)
 * @see [ArcGIS blog - Using attributes to represent real-world sizes of features](https://blogs.esri.com/esri/arcgis/2016/02/01/3d-visualization-using-attributes-to-represent-real-world-sizes-of-features/)
 * @example
 * let symbol = {
 *   type: "line-3d",  // autocasts as new LineSymbol3D()
 *   symbolLayers: [{
 *     type: "path",  // autocasts as new PathSymbol3DLayer()
 *     profile: "circle",
 *     width: 10,    // width of the tube in meters
 *     material: { color: [ 128,128,128 ] }
 *   }]
 * };
 */
export default class LineSymbol3D extends Symbol3D {
  constructor(properties?: LineSymbol3DProperties);
  /**
   * A Collection of [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3DLayer.html) objects
   * used to visualize the graphic or feature. Individual symbol layers
   * may be autocast as objects and specified using the `type` property.
   */
  get symbolLayers(): Collection<SupportedSymbolLayerTypes>;
  set symbolLayers(value: ReadonlyArrayOrCollection<((LineSymbol3DLayerProperties & { type: "line" }) | (PathSymbol3DLayerProperties & { type: "path" }))>);
  /** The symbol type. */
  get type(): "line-3d";
  /**
   * Creates a deep clone of the symbol.
   *
   * @returns A deep clone of the object that
   *                                             invoked this method.
   * @example
   * // Creates a deep clone of the graphic's symbol
   * let symLyr = graphic.symbol.clone();
   */
  clone(): LineSymbol3D;
}