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

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

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

/**
 * Domains define constraints on a [Layer](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/)
 * [Field](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/). 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/references/core/layers/support/Field/)
 */
export default abstract class Domain extends JSONSupport {
  /** The domain name. */
  accessor name: string;
  /** The domain type. */
  accessor type: TypeKebabCase | null | undefined;
}