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/references/core/analysis/LineOfSightAnalysis/) or [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/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/references/core/geometry/Point/) 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/references/core/widgets/LineOfSight/) analysis.
 * The [location](https://developers.arcgis.com/javascript/latest/references/core/widgets/LineOfSight/LineOfSightTarget/#location) represents the [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/) the observer is looking at,
 * while [visible](https://developers.arcgis.com/javascript/latest/references/core/widgets/LineOfSight/LineOfSightTarget/#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/references/core/widgets/LineOfSight/LineOfSightTarget/#intersectedGraphic)
 * property will point to the first intersected graphic. The [intersectedLocation](https://developers.arcgis.com/javascript/latest/references/core/widgets/LineOfSight/LineOfSightTarget/#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/references/core/analysis/LineOfSightAnalysisTarget/) on [LineOfSightAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysis/) instead.
 * @since 4.14
 * @see [LineOfSight](https://developers.arcgis.com/javascript/latest/references/core/widgets/LineOfSight/)
 * @see [LineOfSightViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/LineOfSight/LineOfSightViewModel/)
 */
export default class LineOfSightTarget extends Accessor {
  constructor(properties?: LineOfSightTargetProperties);
  /**
   * The first [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) 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/references/core/geometry/Point/) 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/references/core/geometry/Point/) 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;
}