import { OjWebElement } from '../';

/**
 * This is the base class for oj-input-date-time WebElement, and is generated from the
 * component's metadata. Do not modify these contents since they'll be replaced
 * during the next generation.
 * Put overrides into the WebElements's subclass, OjInputDateTime.ts.
 */
export class OjInputDateTimeBase extends OjWebElement {
  /**
   * Gets the value of <code>asyncValidators</code> property.
   * Specifies a list of asynchronous validators used by the component when performing validation. Use async-validators when you need to perform some validation work on the server. See the Help documentation for more information.
   * @return The value of <code>asyncValidators</code> property.
   * @deprecated Since 8.0.0. Use the validators property instead for either regular Validators or AsyncValidators.
   */
  public getAsyncValidators(): Promise<Array<object>> {
    return this.getProperty<Array<object>>('asyncValidators');
  }

  /**
   * Gets the value of <code>autocomplete</code> property.
   * Specifies a component's autocomplete state. See the Help documentation for more information.
   * @return The value of <code>autocomplete</code> property.
   * @deprecated Since 17.0.0. The date field contains mask segments instead of a general input, so autocomplete is not supported.
   */
  public getAutocomplete(): Promise<string> {
    return this.getProperty<string>('autocomplete');
  }

  /**
   * Gets the value of <code>autofocus</code> property.
   * Specifies whether the component will get input focus when the page is loaded. See the Help documentation for more information.
   * @return The value of <code>autofocus</code> property.
   * @deprecated Since 17.0.0. This is not recommended for accessibility reasons.
   */
  public getAutofocus(): Promise<boolean> {
    return this.getProperty<boolean>('autofocus');
  }

  /**
   * Gets the value of <code>converter</code> property.
   * An object that converts the datetime value. See the Help documentation for more information.
   * @return The value of <code>converter</code> property.
   *
   */
  public getConverter(): Promise<object> {
    return this.getProperty<object>('converter');
  }

  /**
   * Gets the value of <code>datePicker</code> property.
   * An object whose properties describe the appearance and behavior of the date picker. See the Help documentation for more information.
   * @return The value of <code>datePicker</code> property.
   *
   */
  public getDatePicker(): Promise<DatePicker> {
    return this.getProperty<DatePicker>('datePicker');
  }

  /**
   * Gets the value of <code>dayFormatter</code> property.
   * Specifies a callback function used when rendering the day. See the Help documentation for more information.
   * @return The value of <code>dayFormatter</code> property.
   *
   */
  public getDayFormatter(): Promise<null> {
    return this.getProperty<null>('dayFormatter');
  }

  /**
   * Gets the value of <code>dayMetaData</code> property.
   * Specifies additional information to be used when rendering the day. See the Help documentation for more information.
   * @return The value of <code>dayMetaData</code> property.
   * @deprecated Since 17.0.0. Use dayFormatter instead, as it is more flexible.
   */
  public getDayMetaData(): Promise<object> {
    return this.getProperty<object>('dayMetaData');
  }

  /**
   * Gets the value of <code>describedBy</code> property.
   * The form component's oj-label automatically sets described-by to make it accessible. It is not meant to be set by application developer.
   * @return The value of <code>describedBy</code> property.
   *
   */
  public getDescribedBy(): Promise<string> {
    return this.getProperty<string>('describedBy');
  }

  /**
   * Gets the value of <code>disabled</code> property.
   * Specifies whether the component is disabled. The default is false.
   * @return The value of <code>disabled</code> property.
   *
   */
  public getDisabled(): Promise<boolean> {
    return this.getProperty<boolean>('disabled');
  }

  /**
   * Gets the value of <code>displayOptions</code> property.
   * Display options for auxiliary content that determines whether or not it should be displayed.
   * @return The value of <code>displayOptions</code> property.
   *
   */
  public getDisplayOptions(): Promise<DisplayOptions> {
    return this.getProperty<DisplayOptions>('displayOptions');
  }

  /**
   * Gets the value of <code>help</code> property.
   * Form component help information.
   * @return The value of <code>help</code> property.
   *
   */
  public getHelp(): Promise<Help> {
    return this.getProperty<Help>('help');
  }

  /**
   * Gets the value of <code>helpHints</code> property.
   * Represents hints for an oj-form-layout element to render help information on the label of the editable component.
   * @return The value of <code>helpHints</code> property.
   *
   */
  public getHelpHints(): Promise<HelpHints> {
    return this.getProperty<HelpHints>('helpHints');
  }

  /**
   * Gets the value of <code>keyboardEdit</code> property.
   * Determines if keyboard entry of the text is allowed. When disabled, the picker must be used to select the date. See the Help documentation for more information.
   * @return The value of <code>keyboardEdit</code> property.
   * @deprecated Since 17.0.0. This is not supported in the Redwood UX specification.
   */
  public getKeyboardEdit(): Promise<string> {
    return this.getProperty<string>('keyboardEdit');
  }

  /**
   * Gets the value of <code>labelEdge</code> property.
   * Defines how the label of a component is created. See the Help documentation for more information.
   * @return The value of <code>labelEdge</code> property.
   *
   */
  public getLabelEdge(): Promise<string> {
    return this.getProperty<string>('labelEdge');
  }

  /**
   * Gets the value of <code>labelHint</code> property.
   * Represents a hint for oj-form-layout element to render a label on the editable component.
   * @return The value of <code>labelHint</code> property.
   *
   */
  public getLabelHint(): Promise<string> {
    return this.getProperty<string>('labelHint');
  }

  /**
   * Gets the value of <code>labelledBy</code> property.
   * The oj-label sets the labelledBy property programmatically on the form component. See the Help documentation for more information.
   * @return The value of <code>labelledBy</code> property.
   * @deprecated Since 17.0.0. This is an internal API and is not supported in the Redwood UX specification.
   */
  public getLabelledBy(): Promise<string | null> {
    return this.getProperty<string | null>('labelledBy');
  }

  /**
   * Gets the value of <code>max</code> property.
   * The maximum selectable datetime, in ISO string format. When set to null, there is no maximum.
   * @return The value of <code>max</code> property.
   *
   */
  public getMax(): Promise<string | null> {
    return this.getProperty<string | null>('max');
  }

  /**
   * Sets the value of <code>messagesCustom</code> property.
   * A list of messages added by an application to the component. See the Help documentation for more information.
   * @param messagesCustom The value to set for <code>messagesCustom</code>
   *
   */
  public changeMessagesCustom(messagesCustom: Array<object>): Promise<void> {
    return this.setProperty<Array<object>>('messagesCustom', messagesCustom);
  }

  /**
   * Gets the value of <code>messagesCustom</code> property.
   * A list of messages added by an application to the component. See the Help documentation for more information.
   * @return The value of <code>messagesCustom</code> property.
   *
   */
  public getMessagesCustom(): Promise<Array<object>> {
    return this.getProperty<Array<object>>('messagesCustom');
  }

  /**
   * Gets the value of <code>min</code> property.
   * The minimum selectable datetime, in ISO string format. When set to null, there is no minimum.
   * @return The value of <code>min</code> property.
   *
   */
  public getMin(): Promise<string | null> {
    return this.getProperty<string | null>('min');
  }

  /**
   * Gets the value of <code>name</code> property.
   * Specifies the name of the component.
   * @return The value of <code>name</code> property.
   * @deprecated Since 6.0.0. JET does not use form submit, so this is not needed.
   */
  public getName(): Promise<string> {
    return this.getProperty<string>('name');
  }

  /**
   * Gets the value of <code>pickerAttributes</code> property.
   * Specifies attributes to be set on the picker DOM element when it is launched. See the Help documentation for more information.
   * @return The value of <code>pickerAttributes</code> property.
   * @deprecated Since 17.0.0. Changing the Class or Style property is not recommended, as it leads to an inconsistent UI.
   */
  public getPickerAttributes(): Promise<PickerAttributes> {
    return this.getProperty<PickerAttributes>('pickerAttributes');
  }

  /**
   * Gets the value of <code>placeholder</code> property.
   * The placeholder text to set on the element.
   * @return The value of <code>placeholder</code> property.
   * @deprecated Since 17.0.0. The date field contains mask segments instead of a general input, so placeholder is not supported.
   */
  public getPlaceholder(): Promise<string> {
    return this.getProperty<string>('placeholder');
  }

  /**
   * Gets the value of <code>rawValue</code> property.
   * Read-only property used for retrieving the current value from the input field in string form. See the Help documentation for more information.
   * @return The value of <code>rawValue</code> property.
   *
   */
  public getRawValue(): Promise<string> {
    return this.getProperty<string>('rawValue');
  }

  /**
   * Gets the value of <code>readonly</code> property.
   * Specifies whether the component is read-only. A read-only element cannot be modified, but user interaction is allowed. See the Help documentation for more information.
   * @return The value of <code>readonly</code> property.
   *
   */
  public getReadonly(): Promise<boolean> {
    return this.getProperty<boolean>('readonly');
  }

  /**
   * Gets the value of <code>renderMode</code> property.
   * Specifies whether to render the date picker in JET, or as a native picker control. See the Help documentation for more information.
   * @return The value of <code>renderMode</code> property.
   * @deprecated Since 8.0.0. The "native" mode rendering is deprecated because JET is promoting a consistent Oracle UX over native look and feel in Redwood. Since this property takes only two values the property itself is deprecated. The theme variable "$inputDateTimeRenderModeOptionDefault" is also deprecated for the same reason.
   */
  public getRenderMode(): Promise<string> {
    return this.getProperty<string>('renderMode');
  }

  /**
   * Gets the value of <code>required</code> property.
   * Specifies whether the component is required or optional. See the Help documentation for more information.
   * @return The value of <code>required</code> property.
   *
   */
  public getRequired(): Promise<boolean> {
    return this.getProperty<boolean>('required');
  }

  /**
   * Gets the value of <code>timePicker</code> property.
   * An object whose properties describe the appearance and behavior of the time picker. See the Help documentation for more information.
   * @return The value of <code>timePicker</code> property.
   *
   */
  public getTimePicker(): Promise<TimePicker> {
    return this.getProperty<TimePicker>('timePicker');
  }

  /**
   * Gets the value of <code>translations</code> property.
   * A collection of translated resources from the translation bundle, or null if this component has no resources.
   * @return The value of <code>translations</code> property.
   *
   */
  public getTranslations(): Promise<Translations | null> {
    return this.getProperty<Translations | null>('translations');
  }

  /**
   * Gets the value of <code>userAssistanceDensity</code> property.
   * Specifies the density of the form component's user assistance presentation.
   * @return The value of <code>userAssistanceDensity</code> property.
   *
   */
  public getUserAssistanceDensity(): Promise<string> {
    return this.getProperty<string>('userAssistanceDensity');
  }

  /**
   * Gets the value of <code>valid</code> property.
   * The validity state of the component
   * @return The value of <code>valid</code> property.
   *
   */
  public getValid(): Promise<string> {
    return this.getProperty<string>('valid');
  }

  /**
   * Gets the value of <code>validators</code> property.
   * A list of validators used by the element, along with any implicit component validators, when performing validation. See the Help documentation for more information.
   * @return The value of <code>validators</code> property.
   *
   */
  public getValidators(): Promise<Array<object>> {
    return this.getProperty<Array<object>>('validators');
  }

  /**
   * Sets the value of <code>value</code> property.
   * The value of the input datetime element, which must be an ISOString. See the Help documentation for more information.
   * @param value The value to set for <code>value</code>
   *
   */
  public changeValue(value: string): Promise<void> {
    return this.setProperty<string>('value', value);
  }

  /**
   * Gets the value of <code>value</code> property.
   * The value of the input datetime element, which must be an ISOString. See the Help documentation for more information.
   * @return The value of <code>value</code> property.
   *
   */
  public getValue(): Promise<string> {
    return this.getProperty<string>('value');
  }
}
export interface DatePicker {
  /**
   * Specifies whether the month should be rendered as a button to allow selection, instead of as text.
   */
  changeMonth: string;
  /**
   * Specifies whether the year should be rendered as a button to allow selection, instead of as text.
   */
  changeYear: string;
  /**
   * Specifies the position in multiple months at which to show the current month (starting at 0).
   * @deprecated Since 17.0.0. This is required when date-picker.number-of-months > 1, which is now deprecated, so this is no longer needed.
   */
  currentMonthPos: number;
  /**
   * Specifies the behavior of days outside the current viewing month.
   */
  daysOutsideMonth: string;
  /**
   * Specifies what content is shown within the footer of the calendar.
   * @deprecated Since 8.2.0. This attribute is deprecated and should not be used as it will be ignored in new UX design.
   */
  footerLayout: string;
  /**
   * Specifies the number of months to show at once. See the Help documentation for more information.
   * @deprecated Since 17.0.0. This is not supported in the Redwood UX specification for Date Picker. See the Range Picker UX specification.
   */
  numberOfMonths: number;
  /**
   * Specifies when the date picker should be shown.
   * @deprecated Since 17.0.0. This is not supported in the Redwood UX specification.
   */
  showOn: string;
  /**
   * Specifies the number of months to step backwards and forwards for the Ctrl+Alt+Page Up and Ctrl+Alt+Page Down keystrokes.
   * @deprecated Since 17.0.0. This is not in the Redwood UX specification.
   */
  stepBigMonths: number;
  /**
   * Specifies how the prev and next keys will step backwards and forwards through the months. See the Help documentation for more information.
   * @deprecated Since 17.0.0. This is not in the Redwood UX specification.
   */
  stepMonths: string | number;
  /**
   * Specifies whether the week of the year will be shown.
   */
  weekDisplay: string;
  /**
   * Specifies the range of years displayed in the year drop-down. See the Help documentation for more information.
   * @deprecated Since 17.0.0. This is not in the Redwood UX specification. The 'min' and 'max' properties should be used instead.
   */
  yearRange: string;
}
export interface DisplayOptions {
  /**
   * Display options for auxiliary converter hint text that determines whether it should be displayed.
   */
  converterHint: Array<string> | string;
  /**
   * Display options for auxiliary help instruction text that determines whether it should be displayed.
   * @deprecated Since 9.0.0. If you want none, remove help-instruction attribute.
   */
  helpInstruction: Array<string> | string;
  /**
   * Display options for auxiliary message text that determines whether it should be displayed.
   */
  messages: Array<string> | string;
  /**
   * Display options for auxiliary validator hint text that determines whether it should be displayed.
   */
  validatorHint: Array<string> | string;
}
export interface Help {
  /**
   * Represents advisory information for the component, such as would be appropriate for a tooltip.
   */
  instruction: string;
}
export interface HelpHints {
  /**
   * Hint for help definition text associated with the label.
   */
  definition: string;
  /**
   * Help source URL associated with the component.
   */
  source: string;
}
export interface PickerAttributes {
  /**
   *
   * @deprecated Since 17.0.0. We are recommending not to change the Class property of pickerAttribute as it leads to an inconsistent UI.
   */
  class: string;
  /**
   *
   * @deprecated Since 7.0.0. Style property of pickerAttribute violates the recommended Content Security Policy for JET which disallows inline styles. Use class property instead. As of 11.0.0 this attribute is ignored and an error is logged.
   */
  style: string;
}
export interface TimePicker {
  /**
   * Specifies what content is shown within the footer of the wheel time picker.
   * @deprecated Since 8.2.0. This attribute is deprecated and should not be used as it will be ignored in new UX design.
   */
  footerLayout: string;
  /**
   * Specifies when the time picker should be shown.
   */
  showOn: string;
  /**
   * Specifies the time increment used for InputDateTime. See the Help documentation for more information.
   */
  timeIncrement: string;
}
export interface Translations {
  /**
   * Message to announce to AT via aria-live when the length.max is exceeded.
   * @deprecated Since 17.0.0. This is not supported by the component.
   */
  accessibleMaxLengthExceeded: string;
  /**
   * Message to annnouce to AT via aria-live for the remaining character count.
   * @deprecated Since 17.0.0. This is not supported by the component.
   */
  accessibleMaxLengthRemaining: string;
  /**
   * The text to display for the Cancel link.
   */
  cancel: string;
  /**
   * The text to display for the current day link.
   * @deprecated Since 17.0.0. The Redwood UX specification does not allow this to be configurable.
   */
  currentText: string;
  /**
   * Provides properties to customize the hint and message text used by the implicit date restriction validator associated to the InputDateTime and InputDate components.
   */
  dateRestriction: TranslationsDateRestriction;
  /**
   * Provides properties to customize the hint and message text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components.
   */
  dateTimeRange: TranslationsDateTimeRange;
  /**
   * The text to display for the switcher's Done link.
   */
  done: string;
  /**
   * The text to display for the next month link.
   * @deprecated Since 17.0.0. The Redwood UX specification does not allow this to be configurable.
   */
  nextText: string;
  /**
   * The text to display for the previous month link.
   * @deprecated Since 17.0.0. The Redwood UX specification does not allow this to be configurable.
   */
  prevText: string;
  /**
   * Provides properties to customize the message text used by the implicit regexp validator associated to the InputText and TextArea components.
   * @deprecated Since 17.0.0. This is not supported by the component.
   */
  regexp: TranslationsRegexp;
  /**
   * Provides properties to customize the summary, detail and hint text used by the implicit required validator associated to any editable component that supports the required option.
   */
  required: TranslationsRequired;
  /**
   * The aria-label text for the time input in a oj-date-time-picker. When the screen reader user tabs to the input, they will hear 'Time' so that they know they are on the time field of the oj-date-time-picker.
   */
  time: string;
  /**
   * Tooltip text for the calendar icon.
   * @deprecated Since 17.0.0. This is not configurable per component instance in the Redwood UX specification.
   */
  tooltipCalendar: string;
  /**
   * Tooltip text for the calendar icon when the component is disabled.
   * @deprecated Since 17.0.0. This is not configurable per component instance in the Redwood UX specification.
   */
  tooltipCalendarDisabled: string;
  /**
   * Tooltip text for the calendar + time icon.
   * @deprecated Since 17.0.0. This is not configurable per component instance in the Redwood UX specification.
   */
  tooltipCalendarTime: string;
  /**
   * Tooltip text for the calendar + time icon when the component is disabled.
   * @deprecated Since 17.0.0. This is not configurable per component instance in the Redwood UX specification.
   */
  tooltipCalendarTimeDisabled: string;
  /**
   * The text to display for the week of the year column heading.
   * @deprecated Since 17.0.0. The Redwood UX specification does not allow this to be configurable.
   */
  weekHeader: string;
}
export interface TranslationsDateRestriction {
  /**
   * Hint text used by the implicit date restriction validator associated to the InputDateTime and InputDate components.
   * @deprecated Since 17.0.0. Please use help-hints instead.
   */
  hint: string;
  /**
   * Message detail for the implicit date restriction validator associated to the InputDateTime and InputDate components.
   */
  messageDetail: string;
  /**
   * Message summary for the implicit date restriction validator associated to the InputDateTime and InputDate components.
   * @deprecated Since 17.0.0. This is not supported in the Redwood UX specification.
   */
  messageSummary: string;
}
export interface TranslationsDateTimeRange {
  /**
   * Provides properties to customize the hint text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components.
   * @deprecated Since 17.0.0. Please use help-hints instead.
   */
  hint: TranslationsDateTimeRangeHint;
  /**
   * Provides properties to customize the error message text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components.
   */
  messageDetail: TranslationsDateTimeRangeMessageDetail;
  /**
   * Provides properties to customize the error message summary text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components.
   * @deprecated Since 17.0.0. This is not supported in the Redwood UX specification.
   */
  messageSummary: TranslationsDateTimeRangeMessageSummary;
}
export interface TranslationsDateTimeRangeHint {
  /**
   * Hint text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. hint.inRange is shown when both min and max are set, and is used to tell the user the allowed number range.
   * @deprecated Since 17.0.0. Please use help-hints instead.
   */
  inRange: string;
  /**
   * Hint text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. hint.max is shown when max is set and min is not set, and is used to tell the user the allowed maximum.
   * @deprecated Since 17.0.0. Please use help-hints instead.
   */
  max: string;
  /**
   * Hint text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. hint.min is shown when min is set and max is not set, and is used to tell the user the allowed minimum.
   * @deprecated Since 17.0.0. Please use help-hints instead.
   */
  min: string;
}
export interface TranslationsDateTimeRangeMessageDetail {
  /**
   * Error message text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. messageDetail.rangeOverflow is shown when max is set, and the value is greater than the maximum.
   */
  rangeOverflow: string;
  /**
   * Error message text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. messageDetail.rangeUnderflow is shown when min is set, and the value is less than the minimum.
   */
  rangeUnderflow: string;
}
export interface TranslationsDateTimeRangeMessageSummary {
  /**
   * Error message summary text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. messageSummary.rangeOverflow is shown when max is set, and the value is greater than the maximum.
   * @deprecated Since 17.0.0. This is not supported in the Redwood UX specification.
   */
  rangeOverflow: string;
  /**
   * Error message summary text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. messageSummary.rangeUnderflow is shown when min is set, and the value is less than the minimum.
   * @deprecated Since 17.0.0. This is not supported in the Redwood UX specification.
   */
  rangeUnderflow: string;
}
export interface TranslationsRegexp {
  /**
   * Provides properties to customize the error message detail used by the implicit regexp validator associated to the InputText and TextArea components.
   * @deprecated Since 17.0.0. This is not supported by the component.
   */
  messageDetail: string;
  /**
   * Provides properties to customize the error message summary used by the implicit regexp validator associated to the InputText and TextArea components.
   * @deprecated Since 17.0.0. This is not supported by the component.
   */
  messageSummary: string;
}
export interface TranslationsRequired {
  /**
   * Hint text used by required validation error.
   * @deprecated Since 17.0.0. Please use help-hints instead.
   */
  hint: string;
  /**
   * Message text that describes the details of the required validation error.
   */
  messageDetail: string;
  /**
   * Message text for summarizing a required validation error.
   * @deprecated Since 14.0.0. This is deprecated because in the Redwood design system form components do not show validator summaries, so this is no longer needed.
   */
  messageSummary: string;
}
