import type Color from "../Color.js";
import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";
import type { SymbolType } from "./types.js";
import type { ColorLike } from "../Color.js";

export interface SymbolProperties extends JSONSupportMixinProperties {
  /**
   * The color of the symbol.
   * This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string,
   * an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object.
   *
   * @default "black"
   * @example
   * // CSS color string
   * symbol.color = "dodgerblue";
   * @example
   * // HEX string
   * symbol.color = "#33cc33";
   * @example
   * // array of RGBA values
   * symbol.color = [51, 204, 51, 0.3];
   * @example
   * // object with rgba properties
   * symbol.color = {
   *   r: 51,
   *   g: 51,
   *   b: 204,
   *   a: 0.7
   * };
   */
  color?: ColorLike | null;
}

/**
 * Symbol is the base class for all symbols. Symbols represent point, line, polygon,
 * and mesh geometries as vector graphics within a [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html).
 * Symbols can only be set directly on individual [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol)
 * in a [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html) or in [View#graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics).
 * Otherwise they are assigned to a [Renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html) that is applied to a
 * [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html).
 *
 * Numerous symbols are available for depicting features. Choosing a symbol type
 * depends on the following:
 *
 * * The type of [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) in which the symbols will be rendered -
 * either [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) (for 2D) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) (for 3D)
 * * The [geometry type](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#type) of the feature(s)
 * * The purpose and context of the visualization
 *
 * The following table indicates which symbol subclasses you should work with depending on the view type.
 *
 * View type | Symbol subclasses
 * ----------|------------------
 * [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) (2D) | [FillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-FillSymbol.html), [LineSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol.html), [MarkerSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MarkerSymbol.html), [TextSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html), [WebStyleSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html), [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html)
 * [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) (3D) | [Symbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol3D.html), [WebStyleSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html), [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html)
 *
 * If working with data in a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html), use the following table as a guide
 * for choosing a symbol type.
 *
 * Geometry type | Valid symbol types
 * --------------|-------------------
 * [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) | [SimpleMarkerSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html), [PictureMarkerSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html), [TextSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html), [WebStyleSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html), [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html)
 * [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) | [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html), [TextSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html), [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html)
 * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) | [SimpleFillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html), [PictureFillSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureFillSymbol.html), [SimpleMarkerSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html), [TextSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html), [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html)
 *
 * If working with data in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), use the following table as a guide
 * when selecting a symbol type.
 *
 * Geometry type | Valid symbol types
 * --------------|-------------------
 * [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) | [PointSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PointSymbol3D.html), [LabelSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html), [WebStyleSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html), [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html)
 * [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) | [LineSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LineSymbol3D.html), [LabelSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html)
 * [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) | [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PolygonSymbol3D.html), [LabelSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html)
 * [Mesh](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html) | [MeshSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html), [LabelSymbol3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html)
 *
 * While not expressly indicated in the tables above, 2D symbols are supported in 3D
 * [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) while 3D symbols are not
 * supported in 2D [MapViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html). However, it is recommended
 * to favor 3D symbol types over 2D symbols when working in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
 *
 * @since 4.0
 * @see [Symbol Builder](https://developers.arcgis.com/javascript/latest/visualization/symbols-color-ramps/symbol-builder/)
 * @see [Styles and data visualization](https://developers.arcgis.com/javascript/latest/visualization/)
 * @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)
 */
export default abstract class Symbol extends JSONSupport {
  /**
   * The color of the symbol.
   * This can be autocast with an array of rgb(a) values, named string, hex string or an hsl(a) string,
   * an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object.
   *
   * @default "black"
   * @example
   * // CSS color string
   * symbol.color = "dodgerblue";
   * @example
   * // HEX string
   * symbol.color = "#33cc33";
   * @example
   * // array of RGBA values
   * symbol.color = [51, 204, 51, 0.3];
   * @example
   * // object with rgba properties
   * symbol.color = {
   *   r: 51,
   *   g: 51,
   *   b: 204,
   *   a: 0.7
   * };
   */
  get color(): Color | null | undefined;
  set color(value: ColorLike | null | undefined);
  /** The symbol type. */
  get type(): SymbolType;
}