import type Graphic from "../../../Graphic.js";
import type RelatedRecordsInfoFieldOrder from "../../../popup/support/RelatedRecordsInfoFieldOrder.js";
import type EditableInput from "./EditableInput.js";
import type GroupInput from "./GroupInput.js";
import type { AttributeFormSupportedLayerUnion } from "../types.js";
import type { EditableInputProperties } from "./EditableInput.js";

/** @since 5.1 */
export interface RelationshipElementInputProperties extends EditableInputProperties {}

/**
 * This is a read-only support class that represents a [relationship element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/) in a [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
 *
 * @since 5.1
 * @see [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/)
 * @see [BatchAttributeFormViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/)
 * @see [BatchFormInputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/BatchFormInputs/)
 */
export default class RelationshipElementInput extends EditableInput<any> {
  constructor(properties: RelationshipElementInputProperties);
  /**
   * A numeric value indicating the maximum number of related features to display in the list of related records.
   * If the total amount of features is greater than the `displayCount`, a `Show all` button displays.
   *
   * @default 3
   * @since 5.1
   */
  get displayCount(): number;
  /**
   * A string value indicating how to display related records within the relationship content.
   * Currently, `list` is the only supported value.
   *
   * | Value | Description |
   * | ----- | ----------- |
   * | list  | Shows a list of related records from the specified relationship. |
   *
   * @default "list"
   * @since 5.1
   */
  get displayType(): string;
  /**
   * The single feature associated with this relationship element.
   *
   * @since 5.1
   * @see [BatchAttributeFormViewModel.features](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/#features)
   */
  get feature(): Graphic | null | undefined;
  /**
   * The group containing the relationship element input.
   *
   * @since 5.1
   */
  get group(): GroupInput | null;
  /**
   * Identifies the single feature layer associated with this relationship element.
   * The layer must support feature editing and field access.
   *
   * The following layer types are supported:
   * - [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/)
   * - [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/)
   * - [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/) (with `featureLayer` property)
   * - [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/)
   * - [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/)
   * - [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/)
   *
   * @since 5.1
   * @see [BatchAttributeFormViewModel.layers](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/BatchAttributeFormViewModel/#layers)
   */
  get layer(): AttributeFormSupportedLayerUnion | null | undefined;
  /**
   * An array of [RelatedRecordsInfoFieldOrder](https://developers.arcgis.com/javascript/latest/references/core/popup/support/RelatedRecordsInfoFieldOrder/)
   * objects indicating the field display order for the related records
   * and whether they should be sorted in ascending `asc` or descending `desc` order.
   *
   * @since 5.1
   */
  get orderByFields(): RelatedRecordsInfoFieldOrder[] | null | undefined;
  /**
   * The numeric id value for the defined relationship.
   * This value can be found on the [service](https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm)
   * itself or on the service's [relationships resource](https://developers.arcgis.com/rest/services-reference/enterprise/relationships-feature-service-.htm)
   * if `supportsRelationshipResource` is `true`.
   *
   * @since 5.1
   */
  get relationshipId(): number;
  /**
   * The type of input.
   *
   * @since 5.1
   */
  get type(): "relationship";
  /**
   * Indicates whether the form is currently updating.
   *
   * @since 5.1
   */
  get updating(): boolean;
}