import type Graphic from "../../../Graphic.js";
import type Field from "../../../layers/support/Field.js";
import type EditableInput from "./EditableInput.js";
import type GroupInput from "./GroupInput.js";
import type { Input } from "../../../form/elements/inputs.js";
import type { FieldValue } from "../../../layers/support/fieldUtils.js";
import type { DomainUnion as Domain } from "../../../layers/support/types.js";
import type { EditableInputProperties } from "./EditableInput.js";
import type { FieldInputDataTypes } from "../../support/forms/types.js";

export interface FieldInputProperties extends EditableInputProperties {}

/** Represents the current render state for inline multiple-choice "Other" controls. */
export interface MultipleChoiceOtherChoiceRenderState {}

/**
 * This is a read-only support class that represents a [field element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) in a [BatchAttributeForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/).
 *
 * @since 4.33
 * @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 FieldInput extends EditableInput<any> {
  constructor(properties: FieldInputProperties);
  /**
   * The type of data displayed by the field input. Possible values are listed below.
   *
   * Value | Description
   * ------|------------
   * number | Input represents a number.
   * text |   Input represents text.
   * date | Input represents a date.
   * unsupported | The field represents an unsupported value. A `blob` field type is an example of this.
   */
  get dataType(): FieldInputDataTypes;
  /**
   * Returns an array of distinct values of the field input. If all features have the same value, this property returns an array with a single element containing that value.
   * If the features have different values, this property returns an array containing all distinct values of the field across the features.
   */
  get distinctValues(): FieldValue[];
  /** The input value's domain. This is used to constrain the allowable values of the layer. */
  get domain(): Domain | null | undefined;
  /** Indicates if the field is editable. The field must be editable for all layers associated with the input for this property to be true. */
  get editable(): boolean;
  /** Indicates whether all features have the same value for this field. */
  get featuresHaveSameValue(): boolean;
  /** The associated field. */
  get field(): Field;
  /** The field name as defined by the feature layer. */
  get fieldName(): string;
  /** The group containing the field input. */
  get group(): GroupInput | null;
  /** Indicates whether time information is included for date and time inputs. */
  get includeTime(): boolean;
  /**
   * Indicates whether timestamp information is included for date inputs. This
   * property is always `false` for field types other than `timestamp-offset.`
   *
   * @default false
   */
  get includeTimeOffset(): boolean;
  /** The configured input for this field. */
  get input(): Input | null | undefined;
  /** An array of features that do not have a valid value for this field. */
  get invalidFeatures(): Graphic[];
  /** The input's label. */
  get label(): string;
  /** The maximum length of the input. If no length is specified, the value is `-1`. */
  get maxLength(): number;
  /** The minimum length of the input. If no length is specified, the value is `-1`. */
  get minLength(): number;
  /** The checked state derived from the current other-choice values across all features. */
  get multipleChoiceOtherChoiceCheckboxState(): {
      checked: boolean;
      indeterminate: boolean;
  };
  /** Indicates whether the field is required. This property will be true if it is required for any associated layers of the input. */
  get required(): boolean;
  /** The type of input. */
  get type(): "field";
  /**
   * Indicates whether the user has changed the value of this field.
   *
   * @default false
   */
  get userHasChangedValue(): boolean;
  /** Indicates whether the field has any validation errors. Evaluates to `true` only if the value of this field is valid for all features. */
  get valid(): boolean;
  /**
   * Returns the explicit inline other-choice checked state, if one has been stored.
   *
   * @returns The explicit checked state, or `undefined` if the state has not been set.
   */
  getExplicitMultipleChoiceOtherChoiceCheckedState(): boolean | undefined;
  /**
   * Returns the current render state for inline multiple-choice "Other" controls.
   *
   * @param otherOptionLabel - The fallback label to use when the input does not define a custom other-choice label.
   * @returns The current render state for the inline other-choice controls.
   */
  getMultipleChoiceOtherChoiceRenderState(otherOptionLabel: string): MultipleChoiceOtherChoiceRenderState;
  /**
   * Indicates whether an explicit inline other-choice checked state has been stored.
   *
   * @returns `true` if an explicit checked state has been stored; otherwise, `false`.
   */
  hasExplicitMultipleChoiceOtherChoiceCheckedState(): boolean;
  /** Initializes the explicit inline other-choice checked state from the current feature values when it has not been set yet. */
  initializeExplicitMultipleChoiceOtherChoiceCheckedState(): void;
  /**
   * Stores the explicit inline other-choice checked state.
   *
   * @param isChecked - Indicates whether the inline other-choice checkbox is checked.
   */
  setExplicitMultipleChoiceOtherChoiceCheckedState(isChecked: boolean): void;
}