import type Collection from "../core/Collection.js";
import type IconSymbol3DLayer from "./IconSymbol3DLayer.js";
import type ObjectSymbol3DLayer from "./ObjectSymbol3DLayer.js";
import type Symbol3D from "./Symbol3D.js";
import type TextSymbol3DLayer from "./TextSymbol3DLayer.js";
import type LineCallout3D from "./callouts/LineCallout3D.js";
import type Symbol3DVerticalOffset from "./support/Symbol3DVerticalOffset.js";
import type { Symbol3DProperties } from "./Symbol3D.js";
import type { Symbol3DVerticalOffsetProperties } from "./support/Symbol3DVerticalOffset.js";
import type { LineCallout3DProperties } from "./callouts/LineCallout3D.js";
import type { TextSymbol3DLayerProperties } from "./TextSymbol3DLayer.js";
import type { ObjectSymbol3DLayerProperties } from "./ObjectSymbol3DLayer.js";
import type { IconSymbol3DLayerProperties } from "./IconSymbol3DLayer.js";
import type { ReadonlyArrayOrCollection } from "../core/Collection.js";

export interface PointSymbol3DProperties extends Symbol3DProperties {
  /**
   * Settings for adding a callout visualization to the symbol. Callouts are drawn from the point feature location that is being symbolized,
   * to the vertical offset of the symbol. This property has no effect if [verticalOffset](https://developers.arcgis.com/javascript/latest/references/core/symbols/PointSymbol3D/#verticalOffset) is not set. At the moment only callouts of type line are
   * supported. See [LineCallout3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/callouts/LineCallout3D/).
   *
   * @since 4.4
   * @see [Sample: Point styles for cities](https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/)
   * @example
   * let symbol = {
   *   type: "point-3d",  // autocasts as new PointSymbol3D()
   *   symbolLayers: [...],
   *   verticalOffset: ...,
   *   callout: {
   *     type: "line",  // autocasts as new LineCallout3D()
   *     size: 1.5,
   *     color: [150, 150, 150],
   *     border: {
   *       color: [50, 50, 50]
   *     }
   *   }
   * };
   */
  callout?: (LineCallout3DProperties & { type: "line" }) | null;
  /**
   * A Collection of [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol3DLayer/) objects
   * used to visualize the graphic or feature. Individual symbol layers
   * may be autocast as objects and specified using the `type` property.
   */
  symbolLayers?: ReadonlyArrayOrCollection<((IconSymbol3DLayerProperties & { type: "icon" }) | (ObjectSymbol3DLayerProperties & { type: "object" }) | (TextSymbol3DLayerProperties & { type: "text" }))>;
  /**
   * Shifts the symbol along the vertical world axis by a given height. The height is set in screen space units like points or pixels.
   * For points displayed with a [callout](https://developers.arcgis.com/javascript/latest/references/core/symbols/PointSymbol3D/#callout) `verticalOffset` should be set.
   *
   * @since 4.4
   * @see [Sample: Point styles for cities](https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/)
   * @example
   * let symbol = {
   *   type: "point-3d",  // autocasts as new PointSymbol3D()
   *   symbolLayers: [...],
   *   verticalOffset: {
   *     screenLength: 40,
   *     maxWorldLength: 100,
   *     minWorldLength: 20
   *   },
   *   callout: ...
   * };
   */
  verticalOffset?: Symbol3DVerticalOffsetProperties | null;
}

export type PointSymbol3DSupportedSymbolLayerTypes = IconSymbol3DLayer | ObjectSymbol3DLayer | TextSymbol3DLayer;

/**
 * PointSymbol3D is used to render features with [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) geometry
 * in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). This symbol type is not supported in 2D
 * [MapViews](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
 *
 * A PointSymbol3D must include at least one [symbol layer](https://developers.arcgis.com/javascript/latest/references/core/symbols/PointSymbol3D/#symbolLayers) for it to
 * render in the view. One or more of the following
 * [symbol layer](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol3DLayer/) types must be used to define a 3D point symbol:
 *
 * [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol3DLayer/) Type | Flat/Volumetric | Size Units | Example
 * ------------|-----------|------------|-----------
 * [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/IconSymbol3DLayer/) | flat | points | ![s3d-icon-circle](https://developers.arcgis.com/javascript/latest/assets/references/core/symbols/symbols3d-icon-circle.avif)
 * [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/ObjectSymbol3DLayer/) | volumetric | meters | ![s3d-object](https://developers.arcgis.com/javascript/latest/assets/references/core/symbols/symbols3d-object-sphere.avif)
 * [TextSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol3DLayer/) | flat | points | ![s3d-text](https://developers.arcgis.com/javascript/latest/assets/references/core/symbols/symbols3d-label-text.avif)
 *
 * See [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol3DLayer/) and [Symbol3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol3D/) 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/symbol-builder/)
 * @see [Sample - 3D symbols for points](https://developers.arcgis.com/javascript/latest/sample-code/symbols-points-3d/)
 * @see [Renderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/Renderer/)
 * @see [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/)
 * @see [Sample - Visualize features thematically with multiple variables (3D)](https://developers.arcgis.com/javascript/latest/sample-code/visualization-multivariate-3d/)
 * @see [Sample - Create a local scene](https://developers.arcgis.com/javascript/latest/sample-code/scene-local/)
 * @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: "point-3d",  // autocasts as new PointSymbol3D()
 *   symbolLayers: [{
 *     type: "object",  // autocasts as new ObjectSymbol3DLayer()
 *     width: 5,    // diameter of the object from east to west in meters
 *     height: 10,  // height of object in meters
 *     depth: 15,   // diameter of the object from north to south in meters
 *     resource: { primitive: "cube" },
 *     material: { color: "red" }
 *   }]
 * };
 */
export default class PointSymbol3D extends Symbol3D {
  constructor(properties?: PointSymbol3DProperties);
  /**
   * Settings for adding a callout visualization to the symbol. Callouts are drawn from the point feature location that is being symbolized,
   * to the vertical offset of the symbol. This property has no effect if [verticalOffset](https://developers.arcgis.com/javascript/latest/references/core/symbols/PointSymbol3D/#verticalOffset) is not set. At the moment only callouts of type line are
   * supported. See [LineCallout3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/callouts/LineCallout3D/).
   *
   * @since 4.4
   * @see [Sample: Point styles for cities](https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/)
   * @example
   * let symbol = {
   *   type: "point-3d",  // autocasts as new PointSymbol3D()
   *   symbolLayers: [...],
   *   verticalOffset: ...,
   *   callout: {
   *     type: "line",  // autocasts as new LineCallout3D()
   *     size: 1.5,
   *     color: [150, 150, 150],
   *     border: {
   *       color: [50, 50, 50]
   *     }
   *   }
   * };
   */
  get callout(): LineCallout3D | null | undefined;
  set callout(value: (LineCallout3DProperties & { type: "line" }) | null | undefined);
  /**
   * A Collection of [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol3DLayer/) 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<PointSymbol3DSupportedSymbolLayerTypes>;
  set symbolLayers(value: ReadonlyArrayOrCollection<((IconSymbol3DLayerProperties & { type: "icon" }) | (ObjectSymbol3DLayerProperties & { type: "object" }) | (TextSymbol3DLayerProperties & { type: "text" }))>);
  /** The symbol type. */
  get type(): "point-3d";
  /**
   * Shifts the symbol along the vertical world axis by a given height. The height is set in screen space units like points or pixels.
   * For points displayed with a [callout](https://developers.arcgis.com/javascript/latest/references/core/symbols/PointSymbol3D/#callout) `verticalOffset` should be set.
   *
   * @since 4.4
   * @see [Sample: Point styles for cities](https://developers.arcgis.com/javascript/latest/sample-code/visualization-point-styles/)
   * @example
   * let symbol = {
   *   type: "point-3d",  // autocasts as new PointSymbol3D()
   *   symbolLayers: [...],
   *   verticalOffset: {
   *     screenLength: 40,
   *     maxWorldLength: 100,
   *     minWorldLength: 20
   *   },
   *   callout: ...
   * };
   */
  get verticalOffset(): Symbol3DVerticalOffset | null | undefined;
  set verticalOffset(value: Symbol3DVerticalOffsetProperties | null | undefined);
  /**
   * 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(): PointSymbol3D;
}