import type Graphic from "../../../Graphic.js";
import type InputBase from "./InputBase.js";
import type { AttributeFormSupportedLayerUnion } from "../types.js";
import type { InputBaseProperties } from "./InputBase.js";

/** @since 5.0 */
export interface SingleFeatureInputProperties<Template extends any = any> extends InputBaseProperties {}

/**
 * A read-only class used by [TextElementInput](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-inputs-TextElementInput.html) and used within the [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm.html).
 *
 * @since 5.0
 */
export default abstract class SingleFeatureInput<Template extends any = any> extends InputBase<Template> {
  /**
   * The single feature associated with this form element.
   *
   * @see [BatchAttributeFormViewModel.features](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#features)
   */
  get feature(): Graphic | null | undefined;
  /**
   * Identifies the single feature layer associated with this form element. The layer must support feature editing and field access.
   *
   * The following layer types are supported:
   * - [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html)
   * - [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html)
   * - [SceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) (with `featureLayer` property)
   * - [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html)
   * - [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OrientedImageryLayer.html)
   * - [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-knowledgeGraph-KnowledgeGraphSublayer.html)
   *
   * @since 5.0
   * @see [BatchAttributeFormViewModel.layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#layers)
   */
  get layer(): AttributeFormSupportedLayerUnion | null | undefined;
}