import type LocateSettingBase from "./LocateSettingBase.js";
import type { GPLinearUnit } from "./types.js";
import type { LocateSettingBaseProperties } from "./LocateSettingBase.js";

export interface LocateSettingProperties extends LocateSettingBaseProperties, Partial<Pick<LocateSetting, "tolerance" | "toleranceUnits">> {}

/**
 * A `LocateSetting` defines settings that affect how inputs are located during a route analysis,
 * such as the maximum search distance to use when locating the inputs on the network or the
 * SQL expression to filter the features used for locating.
 *
 * @since 5.0
 * @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 LocateSetting extends LocateSettingBase {
  constructor(properties?: LocateSettingProperties);
  /** Controls the maximum search distance when locating inputs. */
  accessor tolerance: number | null | undefined;
  /** The linear units for [tolerance](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-LocateSetting.html#tolerance). */
  toleranceUnits?: Exclude<GPLinearUnit, "points" | "unknown" | "us-feet"> | null;
}