import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";

export interface DomainProperties extends JSONSupportMixinProperties, Partial<Pick<Domain, "name" | "type">> {}

export type TypeKebabCase = "inherited" | "coded-value" | "range";

/**
 * Domains define constraints on a [Layer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html)
 * [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html). There are two types of domains: coded values and range domains.
 * This class has no constructor.
 *
 * @since 4.0
 * @see [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html)
 */
export default abstract class Domain extends JSONSupport {
  /** The domain name. */
  accessor name: string;
  /** The domain type. */
  accessor type: TypeKebabCase | null | undefined;
}