import type Domain from "./Domain.js";
import type { DomainProperties } from "./Domain.js";

export interface RangeDomainProperties extends DomainProperties, Partial<Pick<RangeDomain, "maxValue" | "minValue">> {}

/**
 * Range domains specify a valid [minimum](https://developers.arcgis.com/javascript/latest/references/core/layers/support/RangeDomain/#minValue) and [maximum](https://developers.arcgis.com/javascript/latest/references/core/layers/support/RangeDomain/#maxValue) valid value that
 * can be stored in numeric and date [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type).
 * For example, a layer for water mains could have a field for water pressure.
 * Distribution water mains can have a pressure between 50 and 75 psi.
 * For a distribution water main object to be valid, its pressure value must be entered as some value between 50 and 75 psi.
 *
 * @since 4.0
 * @see [Domain Objects - ArcGIS Server REST API](https://developers.arcgis.com/documentation/common-data-types/domain-objects.htm)
 * @see [Field](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/)
 */
export default class RangeDomain extends Domain {
  constructor(properties?: RangeDomainProperties);
  /** The maximum valid value. */
  accessor maxValue: number | string;
  /** The minimum valid value. */
  accessor minValue: number | string;
  /** The domain type. */
  get type(): "range";
}