import type Polyline from "../../geometry/Polyline.js";
import type CircuitPathConnectivityElement from "./CircuitPathConnectivityElement.js";
import type TraceLocation from "../../rest/networks/support/TraceLocation.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { TraceLocationProperties } from "../../rest/networks/support/TraceLocation.js";
import type { CircuitPathConnectivityElementProperties } from "./CircuitPathConnectivityElement.js";
import type { PolylineProperties } from "../../geometry/Polyline.js";

export interface CircuitPathProperties extends Partial<Pick<CircuitPath, "order" | "pathId">> {
  /** The geometry of the path, if the trace `resultTypes` includes geometry. */
  geometry?: PolylineProperties | null;
  /** The edges and junctions that constitute the path. */
  pathConnectivity?: CircuitPathConnectivityElementProperties[];
  /** The starting location for the path. */
  startingPoint?: TraceLocationProperties;
  /** The stopping location for the path. */
  stoppingPoint?: TraceLocationProperties;
}

/**
 * Represents a path in the telecom domain network.
 * Paths are returned by path and circuit traces in a telecom domain network.
 *
 * @since 4.34
 */
export default class CircuitPath extends JSONSupport {
  constructor(properties?: CircuitPathProperties);
  /** The geometry of the path, if the trace `resultTypes` includes geometry. */
  get geometry(): Polyline | null | undefined;
  set geometry(value: PolylineProperties | null | undefined);
  /**
   * The unique identifier for the path's order.
   *
   * This is populated when multiple paths are returned for
   * a path trace which uses connectivity inference.
   */
  accessor order: number | null | undefined;
  /** The edges and junctions that constitute the path. */
  get pathConnectivity(): CircuitPathConnectivityElement[];
  set pathConnectivity(value: CircuitPathConnectivityElementProperties[]);
  /** The unique identifier for the path. */
  accessor pathId: number | null | undefined;
  /** The starting location for the path. */
  get startingPoint(): TraceLocation;
  set startingPoint(value: TraceLocationProperties);
  /** The stopping location for the path. */
  get stoppingPoint(): TraceLocation;
  set stoppingPoint(value: TraceLocationProperties);
}