import type Input from "./Input.js";

export interface DatePickerInputProperties extends Partial<Pick<DatePickerInput, "max" | "min">> {}

/**
 * The `DatePickerInput` class defines the desired user interface for editing `date-only` field [Field#type](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type) input. This input is used in [field elements](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-FieldElement.html) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#formTemplate) `formTemplate`. This is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) widget.
 *
 * @since 4.28
 * @see [FieldElement](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-FieldElement.html)
 * @example
 * const datePickerInput = new DatePickerInput({
 *   min: "1982-01-15", // example showing the minimum date input allowed, ie. starts at January 15, 1982
 *   max: "2030-12-31" // example showing the maximum date input allowed, ie. ends with December 31, 2030
 * });
 */
export default class DatePickerInput extends Input {
  constructor(properties?: DatePickerInputProperties);
  /** The maximum date to allow. The string represents an [ISO-8601 date](https://www.iso.org/iso-8601-date-and-time-format.html) and follows the format pattern of `YYYY-MM-DD`. For example, a string of `"2030-12-31` represents the year 2030, on the 31st day in the month of December. */
  accessor max: string | null | undefined;
  /** The minimum date to allow. The string represents an [ISO-8601 date](https://www.iso.org/iso-8601-date-and-time-format.html) and follows the format pattern of `YYYY-MM-DD`.  For example, a string of `"1982-01-15` represents the year 1982, on the 15th day in the month of January. */
  accessor min: string | null | undefined;
  /** The type of form element input. */
  get type(): "date-picker";
  /**
   * Creates a deep clone of the `DatePickerInput` class.
   *
   * @returns A deep clone of the `DatePickerInput` instance.
   */
  clone(): DatePickerInput;
}