import { OjWebElement } from '../';

/**
 * This is the base class for oj-navigation-list 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, OjNavigationList.ts.
 */
export class OjNavigationListBase 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>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>drillMode</code> property.
   * Specifies whether expand/collapse or sliding operations are allowed.
   * @return The value of <code>drillMode</code> property.
   *
   */
  public getDrillMode(): Promise<string> {
    return this.getProperty<string>('drillMode');
  }

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

  /**
   * Gets the value of <code>hierarchyMenuThreshold</code> property.
   * Specifies the level at which the user can see hierarchical menu button. See the Help documentation for more information.
   * @return The value of <code>hierarchyMenuThreshold</code> property.
   * @deprecated Since 13.0.0. The hierarchyMenuThreshold property is deprecated as it is not supported in the Redwood theme.
   */
  public getHierarchyMenuThreshold(): Promise<number> {
    return this.getProperty<number>('hierarchyMenuThreshold');
  }

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

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

  /**
   * Gets the value of <code>rootLabel</code> property.
   * Specifies the label for top level list items.
   * @return The value of <code>rootLabel</code> property.
   *
   */
  public getRootLabel(): Promise<string> {
    return this.getProperty<string>('rootLabel');
  }

  /**
   * 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');
  }
}
export interface Item {
  /**
   * Specifies the renderer for the item. See the Help documentation for more information.
   */
  renderer: null | null;
  /**
   * Specifies whether the item can be selected. See the Help documentation for more information.
   */
  selectable: null | boolean;
}
export interface Translations {
  /**
   * Provides instruction text for vertical NavigationList item expand or collapse
   */
  accessibleExpandCollapseInstructionText: string;
  /**
   * Provides properties to customize the title text used by Sliding Navigation List for root node.
   */
  defaultRootLabel: string;
  /**
   * Provides properties to customize the hover message text used by Sliding Navigation List as label for Hierarchical Menu button.
   */
  hierMenuBtnLabel: string;
  /**
   * Provides properties to customize the message text used by Navigation List when waiting for data.
   */
  msgFetchingData: string;
  /**
   * Provides properties to customize the message text used by Navigation List when there are no items.
   */
  msgNoData: string;
  /**
   * Label for overflow menu button.
   */
  overflowItemLabel: string;
  /**
   * Provides properties to customize the hover message text used by Sliding Navigation List for previous button.
   */
  previousIcon: string;
  /**
   * Provides text to read to screen reader when an item is selected.
   */
  selectedLabel: string;
}
