import type Graphic from "../../../Graphic.js";
import type LineOfSightAnalysisTarget from "../../../analysis/LineOfSightAnalysisTarget.js";
import type Accessor from "../../../core/Accessor.js";
import type Point from "../../../geometry/Point.js";

export interface LineOfSightAnalysisResultProperties extends Partial<Pick<LineOfSightAnalysisResult, "target">> {}

/** Contains the result for a line of sight analysis from a [LineOfSightAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html). */
export default class LineOfSightAnalysisResult extends Accessor {
  constructor(properties?: LineOfSightAnalysisResultProperties);
  /**
   * 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;
  /**
   * Represents a target in a [LineOfSightAnalysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html) which is used to calculate the visibility
   * from the [LineOfSightAnalysis.observer](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html#observer).
   */
  accessor target: LineOfSightAnalysisTarget | null | undefined;
  /** Whether the target is visible from the observer or not. */
  get visible(): boolean;
}