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