import { OjWebElement } from '../';

/**
 * This is the base class for oj-tab-bar 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, OjTabBar.ts.
 */
export class OjTabBarBase extends OjWebElement {
  /**
   * Gets the value of <code>as</code> property.
   * Specifies the alias for the current item when referenced inside the item template.
   * @return The value of <code>as</code> property.
   * @deprecated Since 6.2.0. Set the alias directly on the template element using the data-oj-as attribute instead.
   */
  public getAs(): Promise<string> {
    return this.getProperty<string>('as');
  }

  /**
   * Sets the value of <code>currentItem</code> property.
   * Specifies the key of the item that should have keyboard focus. See the Help documentation for more information.
   * @param currentItem The value to set for <code>currentItem</code>
   *
   */
  public changeCurrentItem(currentItem: any): Promise<void> {
    return this.setProperty<any>('currentItem', currentItem);
  }

  /**
   * Gets the value of <code>currentItem</code> property.
   * Specifies the key of the item that should have keyboard focus. See the Help documentation for more information.
   * @return The value of <code>currentItem</code> property.
   *
   */
  public getCurrentItem(): Promise<any> {
    return this.getProperty<any>('currentItem');
  }

  /**
   * Gets the value of <code>data</code> property.
   * Specifies the data provider for the Tab Bar. See the Help documentation for more information.
   * @return The value of <code>data</code> property.
   * @deprecated Since 14.0.0. Data sets from a DataProvider cannot be sent to WebDriverJS; use ViewModels or page variables instead.
   */
  public getData(): Promise<object | null> {
    return this.getProperty<object | null>('data');
  }

  /**
   * Gets the value of <code>display</code> property.
   * Specifies what needs to be displayed. See the Help documentation for more information.
   * @return The value of <code>display</code> property.
   *
   */
  public getDisplay(): Promise<string> {
    return this.getProperty<string>('display');
  }

  /**
   * Gets the value of <code>edge</code> property.
   * Specifies the edge position of the Tab Bar.
   * @return The value of <code>edge</code> property.
   *
   */
  public getEdge(): Promise<string> {
    return this.getProperty<string>('edge');
  }

  /**
   * Gets the value of <code>item</code> property.
   * Customize the functionality of each tab on Tab Bar.
   * @return The value of <code>item</code> property.
   *
   */
  public getItem(): Promise<Item> {
    return this.getProperty<Item>('item');
  }

  /**
   * Gets the value of <code>layout</code> property.
   * Specifies whether to stretch the tab bar items to occupy available space or to condense items.
   * @return The value of <code>layout</code> property.
   *
   */
  public getLayout(): Promise<string> {
    return this.getProperty<string>('layout');
  }

  /**
   * Gets the value of <code>overflow</code> property.
   * Specifies overflow behaviour for the Tab Bar.
   * @return The value of <code>overflow</code> property.
   *
   */
  public getOverflow(): Promise<string> {
    return this.getProperty<string>('overflow');
  }

  /**
   * Gets the value of <code>reorderable</code> property.
   * Specifies whether tabs can be reordered.
   * @return The value of <code>reorderable</code> property.
   *
   */
  public getReorderable(): Promise<string> {
    return this.getProperty<string>('reorderable');
  }

  /**
   * Sets the value of <code>selection</code> property.
   * Specifies the key of the selected item. See the Help documentation for more information.
   * @param selection The value to set for <code>selection</code>
   *
   */
  public changeSelection(selection: any): Promise<void> {
    return this.setProperty<any>('selection', selection);
  }

  /**
   * Gets the value of <code>selection</code> property.
   * Specifies the key of the selected item. See the Help documentation for more information.
   * @return The value of <code>selection</code> property.
   *
   */
  public getSelection(): Promise<any> {
    return this.getProperty<any>('selection');
  }

  /**
   * 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>truncation</code> property.
   * Specifies whether truncation needs to be applied.
   * @return The value of <code>truncation</code> property.
   *
   */
  public getTruncation(): Promise<string> {
    return this.getProperty<string>('truncation');
  }
}
export interface Item {
  /**
   * Specifies the renderer for the tab item. See the Help documentation for more information.
   */
  renderer: null | null;
  /**
   * Specifies whether the tab can be selected. See the Help documentation for more information.
   */
  selectable: null | boolean;
}
export interface Translations {
  /**
   * Provides properties to customize the screen reader text when the tentative drop target is after a certain item.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  accessibleReorderAfterItem: string;
  /**
   * Provides properties to customize the screen reader text when the tentative drop target is before a certain item.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  accessibleReorderBeforeItem: string;
  /**
   * Provides properties to customize the screen reader touch instructional text for reordering items.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  accessibleReorderTouchInstructionText: string;
  /**
   * Provides properties to customize the context menu cut label.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  labelCut: string;
  /**
   * Provides properties to customize the context menu paste after label.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  labelPasteAfter: string;
  /**
   * Provides properties to customize the context menu paste before label.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  labelPasteBefore: string;
  /**
   * Provides properties to customize the context menu remove label.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  labelRemove: string;
  /**
   * Provides properties to customize the message text used by Tab Bar when waiting for data.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  msgFetchingData: string;
  /**
   * Provides properties to customize the message text used by Tab Bar when there are no items.
   * @deprecated Since 17.0.0. oj-tab-bar no long displays a message when there are no items.
   */
  msgNoData: string;
  /**
   * Label for overflow menu button.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  overflowItemLabel: string;
  /**
   * Text cue for the removable tab, used as the aria-label for the close icon.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  removeCueText: string;
  /**
   * Provides text to read to screen reader when an item is selected.
   * @deprecated Since 18.0.0. The Redwood design system does not allow this to be customized.
   */
  selectedLabel: string;
}
