import { OjWebElement } from '../';

/**
 * This is the base class for oj-input-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, OjInputTime.ts.
 */
export class OjInputTimeBase 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.
   *
   */
  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.
   *
   */
  public getAutofocus(): Promise<boolean> {
    return this.getProperty<boolean>('autofocus');
  }

  /**
   * Gets the value of <code>converter</code> property.
   * An object that converts the time 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>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.
   * Specifies whether keyboard entry of text is allowed. See the Help documentation for more information.
   * @return The value of <code>keyboardEdit</code> property.
   *
   */
  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.
   *
   */
  public getLabelledBy(): Promise<string | null> {
    return this.getProperty<string | null>('labelledBy');
  }

  /**
   * Gets the value of <code>max</code> property.
   * The maximum selectable time, in ISO string format. When set to null, there is no maximum. min and max must be in the same ISO string format as value (local, zulu, or offset)
   * @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 time, in ISO string format. When set to null, there is no minimum. min and max must be in the same ISO string format as value (local, zulu, or offset)
   * @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.
   *
   */
  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.
   *
   */
  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>readonlyUserAssistanceShown</code> property.
   * Specifies which user assistance types should be shown when the component is readonly.
   * @return The value of <code>readonlyUserAssistanceShown</code> property.
   *
   */
  public getReadonlyUserAssistanceShown(): Promise<string> {
    return this.getProperty<string>('readonlyUserAssistanceShown');
  }

  /**
   * Gets the value of <code>renderMode</code> property.
   * Specifies whether to render the time 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. Support for "native" mode rendering is deprecated because JET promotes a consistent Oracle UX based upon the Redwood design system. As a result, the theme variable "$inputDateTimeRenderModeOptionDefault" is also deprecated.
   */
  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 time 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 time 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 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 {
  /**
   *
   */
  class: string;
  /**
   * Deprecated: this property is deprecated since 7.0.0 and will be removed in the future. Please use the "class" property to set a CSS class instead. As of 11.0.0 this property is ignored and an error is logged.
   * @deprecated Since 7.0.0. Style property of pickerAttribute is deprecated as it violates the recommended Content Security Policy for JET which disallows inline styles. Use class property instead.
   */
  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 InputTime. 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 18.0.0. This message text should be consistent across the application, and not configured per component instance.
   */
  accessibleMaxLengthExceeded: string;
  /**
   * Message to announce to AT via aria-live for the remaining character count.
   * @deprecated Since 18.0.0. This message text should be consistent across the application, and not configured per component instance.
   */
  accessibleMaxLengthRemaining: string;
  /**
   * Label for the AM/PM wheel for accessibility.
   */
  ampmWheelLabel: string;
  /**
   * The text to the cancel button.
   */
  cancelText: string;
  /**
   * The text to display for the current time link.
   */
  currentTimeText: string;
  /**
   * 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;
  /**
   * Label for the Hour wheel for accessibility.
   */
  hourWheelLabel: string;
  /**
   * Label for the Minute wheel for accessibility.
   */
  minuteWheelLabel: string;
  /**
   * The text to the OK button.
   */
  okText: string;
  /**
   * Provides properties to customize the message text used by the implicit regexp validator associated to the InputText and TextArea components.
   * @deprecated Since 18.0.0. The implicit regexp validator 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;
  /**
   * Tooltip text for the time icon.
   */
  tooltipTime: string;
  /**
   * Tooltip text for the time icon when the component is disabled.
   */
  tooltipTimeDisabled: 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 18.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 18.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 18.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 18.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 18.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 18.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 18.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 18.0.0. The implicit regexp validator 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 18.0.0. The implicit regexp validator is not supported by the component.
   */
  messageSummary: string;
}
export interface TranslationsRequired {
  /**
   * Hint text used by required validation error.
   * @deprecated Since 18.0.0. Setting a required validator hint is not recommended in the Redwood design system.
   */
  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. In the Redwood design system form components do not show validator summaries, so this is no longer needed.
   */
  messageSummary: string;
}
