/**
 * DO NOT EDIT
 *
 * This file was automatically generated by
 *   https://github.com/Polymer/tools/tree/master/packages/gen-typescript-declarations
 *
 * To modify these typings, edit the source file(s):
 *   vaadin-list-mixin.js
 */


// tslint:disable:variable-name Describing an API that's defined elsewhere.
// tslint:disable:no-any describes the API as best we are able today

import {FlattenedNodesObserver} from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';

import {DirHelper} from '@vaadin/vaadin-element-mixin/vaadin-dir-helper.js';

import {Debouncer} from '@polymer/polymer/lib/utils/debounce.js';

import {timeOut} from '@polymer/polymer/lib/utils/async.js';

export {ListMixin};


/**
 * A mixin for `nav` elements, facilitating navigation and selection of childNodes.
 */
declare function ListMixin<T extends new (...args: any[]) => {}>(base: T): T & ListMixinConstructor;

interface ListMixinConstructor {
  new(...args: any[]): ListMixin;
}

export {ListMixinConstructor};

interface ListMixin {
  readonly focused: Element|null;
  readonly _isRTL: boolean;
  readonly _scrollerElement: HTMLElement;
  readonly _vertical: boolean;

  /**
   * Used for mixin detection because `instanceof` does not work with mixins.
   */
  _hasVaadinListMixin: boolean;

  /**
   * The index of the item selected in the items array.
   * Note: Not updated when used in `multiple` selection mode.
   */
  selected: number|null|undefined;

  /**
   * Define how items are disposed in the dom.
   * Possible values are: `horizontal|vertical`.
   * It also changes navigation keys from left/right to up/down.
   */
  orientation: ListOrientation;

  /**
   * The list of items from which a selection can be made.
   * It is populated from the elements passed to the light DOM,
   * and updated dynamically when adding or removing items.
   *
   * The item elements must implement `Vaadin.ItemMixin`.
   *
   * Note: unlike `<vaadin-combo-box>`, this property is read-only,
   * so if you want to provide items by iterating array of data,
   * you have to use `dom-repeat` and place it to the light DOM.
   */
  readonly items: Element[]|undefined;
  ready(): void;
  _filterItems(array: Element[]): Element[];
  _onClick(event: MouseEvent): void;
  _searchKey(currentIdx: number, key: string): number;
  _onKeydown(event: KeyboardEvent): void;
  _getAvailableIndex(idx: number, increment: number, condition: (p0: Element) => boolean): number;
  _isItemHidden(item: Element): boolean;
  _setFocusable(idx: number): void;
  _focus(idx: number): void;
  focus(): void;

  /**
   * Scroll the container to have the next item by the edge of the viewport.
   */
  _scrollToItem(idx: number): void;
  _scroll(pixels: number): void;
}

import {ListOrientation} from './interfaces';
