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

export interface SingleFeatureInputProperties<Template extends any = any> extends InputBaseProperties {}

/**
 * The mixin for [TextElementInput](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-inputs-TextElementInput.html).
 *
 * @since 5.0
 */
export default abstract class SingleFeatureInput<Template extends any = any> extends InputBase<Template> {
  /**
   * 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)
   *
   * @see [BatchAttributeFormViewModel#layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#layers)
   */
  get layer(): AttributeFormSupportedLayerUnion | null | undefined;
}