import type Graphic from "../../Graphic.js";
import type Accessor from "../../core/Accessor.js";
import type Point from "../../geometry/Point.js";
import type { PointProperties } from "../../geometry/Point.js";

/** @deprecated since version 4.33. Use the [LineOfSightAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html) or [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-line-of-sight/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
export interface LineOfSightTargetProperties {
  /**
   * A [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing the location of the target. Once the location is set, a new line of
   * sight analysis will synchronously calculate the intersection and the visibility.
   */
  location?: PointProperties | null;
}

/**
 * This class represents a target point for a [LineOfSight](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LineOfSight.html) analysis.
 * The [location](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LineOfSight-LineOfSightTarget.html#location) represents the [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) the observer is looking at,
 * while [visible](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LineOfSight-LineOfSightTarget.html#visible) indicates whether the line between the observer and the target intersects 3D graphics,
 * integrated mesh or the ground. If it intersects 3D graphics, then the [intersectedGraphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LineOfSight-LineOfSightTarget.html#intersectedGraphic)
 * property will point to the first intersected graphic. The [intersectedLocation](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LineOfSight-LineOfSightTarget.html#intersectedLocation) corresponds to
 * the first intersection with a 3D graphic, integrated mesh or the ground.
 *
 * @deprecated since version 4.33. Use the [LineOfSightAnalysisTarget](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysisTarget.html) on [LineOfSightAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html) instead.
 * @since 4.14
 * @see [LineOfSight](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LineOfSight.html)
 * @see [LineOfSightViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LineOfSight-LineOfSightViewModel.html)
 */
export default class LineOfSightTarget extends Accessor {
  constructor(properties?: LineOfSightTargetProperties);
  /**
   * The first [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) intersected by the line of sight. If no graphic
   * is intersected then this property is `null`.
   */
  get intersectedGraphic(): Graphic | null | undefined;
  /**
   * A [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing the location where the line of
   * sight first intersects the ground or 3D objects in the scene. If the target is visible
   * this property is `null`.
   */
  get intersectedLocation(): Point | null | undefined;
  /**
   * A [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing the location of the target. Once the location is set, a new line of
   * sight analysis will synchronously calculate the intersection and the visibility.
   */
  get location(): Point | null | undefined;
  set location(value: PointProperties | null | undefined);
  /** Whether the target is visible from the observer or not. */
  get visible(): boolean | null | undefined;
}