import type LocateSettingSource from "./LocateSettingSource.js";
import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { LocateSettingSourceProperties } from "./LocateSettingSource.js";

/** @since 5.0 */
export interface LocateSettingBaseProperties extends Partial<Pick<LocateSettingBase, "allowAutoRelocate">> {
  /**
   * Controls which network source can be used for locating.
   *
   * @since 5.0
   */
  sources?: LocateSettingSourceProperties[] | null;
}

/**
 * `LocateSettingBase` provides the base class for defining how to locate inputs on a network.
 * This class is inherited by [LocateSettings](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-LocateSettings.html).
 *
 * @since 5.0
 * @see [LocateSetting](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-LocateSetting.html)
 * @see [LocateSettings](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-LocateSettings.html)
 * @see [RouteParameters.locateSettings](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RouteParameters.html#locateSettings)
 * @see [locateSettings](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#locatesettings)
 * @see [Locate analysis inputs](https://pro.arcgis.com/en/pro-app/latest/help/analysis/networks/locating-analysis-inputs.htm)
 */
export default class LocateSettingBase extends LocateSettingBaseSuperclass {
  /** @since 5.0 */
  constructor(properties?: LocateSettingBaseProperties);
  /**
   * Controls whether inputs with existing network location fields can be automatically relocated when solving to
   * ensure valid, routable location fields for the analysis.
   *
   * If the value is `true`, points located on restricted network elements and points affected by barriers will be
   * relocated to the closest routable location. If the value is `false`, network location fields will be used as is
   * even if the points are unreachable, and this may cause the solve to fail. Even if the value is `false`, inputs
   * with no location fields or incomplete location fields will be located during the solve operation.
   *
   * @since 5.0
   */
  accessor allowAutoRelocate: boolean | null | undefined;
  /**
   * Controls which network source can be used for locating.
   *
   * @since 5.0
   */
  get sources(): LocateSettingSource[] | null | undefined;
  set sources(value: LocateSettingSourceProperties[] | null | undefined);
}
declare const LocateSettingBaseSuperclass: typeof JSONSupport & typeof ClonableMixin