import type Symbol from "./Symbol.js";
import type { SymbolProperties } from "./Symbol.js";

export interface LineSymbolProperties extends SymbolProperties {
  /**
   * The width of the symbol in points. This value may be autocast with a string
   * expressing size in points or pixels (e.g. `12px`).
   *
   * @default 0.75
   * @example
   * // width in points
   * symbol.width = 4;
   * @example
   * // width in pixels
   * symbol.width = "2px";
   * @example
   * // width in points
   * symbol.width = "4pt";
   */
  width?: number | string;
}

/**
 * Line symbols are used to draw [Polyline](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polyline/) features in
 * a [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) in a 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
 *
 * The only subclass of LineSymbol is [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleLineSymbol/).
 *
 * [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleLineSymbol/) may also be used to symbolize 2D polyline features
 * in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). However, it is
 * recommended you use [LineSymbol3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3D/) instead.
 *
 * @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/)
 */
export default abstract class LineSymbol extends Symbol {
  /** The symbol type. */
  get type(): "simple-line";
  /**
   * The width of the symbol in points. This value may be autocast with a string
   * expressing size in points or pixels (e.g. `12px`).
   *
   * @default 0.75
   * @example
   * // width in points
   * symbol.width = 4;
   * @example
   * // width in pixels
   * symbol.width = "2px";
   * @example
   * // width in points
   * symbol.width = "4pt";
   */
  get width(): number;
  set width(value: number | string);
}