import type Collection from "../core/Collection.js";
import type ExtrudeSymbol3DLayer from "./ExtrudeSymbol3DLayer.js";
import type FillSymbol3DLayer from "./FillSymbol3DLayer.js";
import type IconSymbol3DLayer from "./IconSymbol3DLayer.js";
import type LineSymbol3DLayer from "./LineSymbol3DLayer.js";
import type ObjectSymbol3DLayer from "./ObjectSymbol3DLayer.js";
import type Symbol3D from "./Symbol3D.js";
import type TextSymbol3DLayer from "./TextSymbol3DLayer.js";
import type WaterSymbol3DLayer from "./WaterSymbol3DLayer.js";
import type { Symbol3DProperties } from "./Symbol3D.js";
import type { WaterSymbol3DLayerProperties } from "./WaterSymbol3DLayer.js";
import type { TextSymbol3DLayerProperties } from "./TextSymbol3DLayer.js";
import type { ObjectSymbol3DLayerProperties } from "./ObjectSymbol3DLayer.js";
import type { IconSymbol3DLayerProperties } from "./IconSymbol3DLayer.js";
import type { LineSymbol3DLayerProperties } from "./LineSymbol3DLayer.js";
import type { FillSymbol3DLayerProperties } from "./FillSymbol3DLayer.js";
import type { ExtrudeSymbol3DLayerProperties } from "./ExtrudeSymbol3DLayer.js";
import type { ReadonlyArrayOrCollection } from "../core/Collection.js";

export interface PolygonSymbol3DProperties extends Symbol3DProperties {
  /**
   * 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.
   *
   * > [!WARNING]
   * >
   * > [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3DLayer/) is deprecated for being used with PolygonSymbol3D.
   * > Use [FillSymbol3DLayer.outline](https://developers.arcgis.com/javascript/latest/references/core/symbols/FillSymbol3DLayer/#outline) instead.
   * > [TextSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol3DLayer/) is deprecated for being used with PolygonSymbol3D.
   */
  symbolLayers?: ReadonlyArrayOrCollection<((ExtrudeSymbol3DLayerProperties & { type: "extrude" }) | (FillSymbol3DLayerProperties & { type: "fill" }) | (LineSymbol3DLayerProperties & { type: "line" }) | (IconSymbol3DLayerProperties & { type: "icon" }) | (ObjectSymbol3DLayerProperties & { type: "object" }) | (TextSymbol3DLayerProperties & { type: "text" }) | (WaterSymbol3DLayerProperties & { type: "water" }))>;
}

export type PolygonSymbol3DSupportedSymbolLayerTypes = ExtrudeSymbol3DLayer | FillSymbol3DLayer | LineSymbol3DLayer | IconSymbol3DLayer | ObjectSymbol3DLayer | TextSymbol3DLayer | WaterSymbol3DLayer;

/**
 * PolygonSymbol3D is used to render features with [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) 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/). Polygon features may also be rendered as points
 * with icons or objects at the centroid of each polygon.
 *
 * A PolygonSymbol3D must include at least one [symbol layer](https://developers.arcgis.com/javascript/latest/references/core/symbols/PolygonSymbol3D/#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 polygon symbol:
 *
 * [Symbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/Symbol3DLayer/) Type | Flat/Volumetric | Size Units | Example
 * ------------|-----------|------------|-----------
 * [FillSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/FillSymbol3DLayer/)| flat | - | ![s3d-fill](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-fill-solid.png)
 * [ExtrudeSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/ExtrudeSymbol3DLayer/)| volumetric | meters | ![s3d-extrusion](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-extrude-solid.png)
 * [WaterSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/WaterSymbol3DLayer/) | flat | - | ![s3d-water](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-water-solid.png)
 * [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3DLayer/) | flat | points | ![s3d-line](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-line-line.png)
 * [IconSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/IconSymbol3DLayer/) | flat | points | ![s3d-icon](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-icon-circle.png)
 * [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/ObjectSymbol3DLayer/) | volumetric | meters | ![s3d-object](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-object-sphere.png)
 * [TextSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol3DLayer/) | flat | points | ![s3d-text](https://developers.arcgis.com/javascript/latest/assets/img/apiref/symbols/symbols3d-label-text.png)
 *
 * 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/visualization/symbols-color-ramps/symbol-builder/)
 * @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 extrusion](https://developers.arcgis.com/javascript/latest/sample-code/visualization-vv-extrusion/)
 * @see [Sample - Extrude building footprints based on real world heights](https://developers.arcgis.com/javascript/latest/sample-code/visualization-buildings-3d/)
 * @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: "polygon-3d",  // autocasts as new PolygonSymbol3D()
 *   symbolLayers: [{
 *     type: "extrude",   // autocasts as new ExtrudeSymbol3DLayer()
 *     size: 1000,        // Height of the extrusion in meters
 *     material: { color: "blue" }
 *   }]
 * };
 */
export default class PolygonSymbol3D extends Symbol3D {
  constructor(properties?: PolygonSymbol3DProperties);
  /**
   * 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.
   *
   * > [!WARNING]
   * >
   * > [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3DLayer/) is deprecated for being used with PolygonSymbol3D.
   * > Use [FillSymbol3DLayer.outline](https://developers.arcgis.com/javascript/latest/references/core/symbols/FillSymbol3DLayer/#outline) instead.
   * > [TextSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol3DLayer/) is deprecated for being used with PolygonSymbol3D.
   */
  get symbolLayers(): Collection<PolygonSymbol3DSupportedSymbolLayerTypes>;
  set symbolLayers(value: ReadonlyArrayOrCollection<((ExtrudeSymbol3DLayerProperties & { type: "extrude" }) | (FillSymbol3DLayerProperties & { type: "fill" }) | (LineSymbol3DLayerProperties & { type: "line" }) | (IconSymbol3DLayerProperties & { type: "icon" }) | (ObjectSymbol3DLayerProperties & { type: "object" }) | (TextSymbol3DLayerProperties & { type: "text" }) | (WaterSymbol3DLayerProperties & { type: "water" }))>);
  /** The symbol type. */
  get type(): "polygon-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
   * const symbolLayer = graphic.symbol.clone();
   */
  clone(): PolygonSymbol3D;
}