// Type definitions for agate/Picker

import * as React from "react";
import { ChangeableProps as ui_Changeable_ChangeableProps } from "@enact/ui/Changeable";

type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type Merge<M, N> = Omit<M, Extract<keyof M, keyof N>> & N;

export interface PickerBaseProps {
  /**
   * Picker value list.
   */
  children: Array<any>;
  /**
 * Overrides the  `aria-valuetext`  for the picker. By default,  `aria-valuetext`  is set
to the current value. This should only be used when the parent controls the value of
the picker directly through the props.
 */
  "aria-label"?: string;
  /**
   * Sets the hint string read when focusing the decrement button.
   */
  decrementAriaLabel?: string;
  /**
   * Disables the picker.
   */
  disabled?: boolean;
  /**
   * Sets the hint string read when focusing the increment button.
   */
  incrementAriaLabel?: string;
  /**
   * Disables transition animation.
   */
  noAnimation?: boolean;
  /**
   * Called when the  `value`  changes.
   */
  onChange?: Function;
  /**
   * Orientation of the picker.
   *
   * Controls whether the buttons are arranged horizontally or vertically around the value.
   * *  Values:  `'horizontal'` ,  `'vertical'`
   */
  orientation?: string;
  /**
   * Index of the selected child.
   */
  value?: number;
  /**
 * Allows picker to continue from the start of the list after it reaches the end and
vice-versa.
 */
  wrap?: boolean;
}
/**
 * The base  `Picker`  component.
 *
 * This version is not  `spottable`  .
 */

export class PickerBase extends React.Component<
  Merge<React.HTMLProps<HTMLElement>, PickerBaseProps>
> {}

export interface PickerDecoratorProps extends ui_Changeable_ChangeableProps {}
export function PickerDecorator<P>(
  Component: React.ComponentType<P> | string
): React.ComponentType<P & PickerDecoratorProps>;

export interface PickerProps extends PickerBaseProps {
  /**
   * Default index of the selected child.
   *
   * _Note_ : Changing  `defaultValue`  after initial render has no effect.
   */
  defaultValue?: number;
}
/**
 * A Picker component that allows selecting values from a list of values.
 * 
 * By default,  `Picker`  maintains the state of its  `value`  property. Supply the  `defaultValue` 
property to control its initial value. If you wish to directly control updates to the component,
supply a value to  `value`  at creation time and update it in response to  `onChange`  events.
 */

export class Picker extends React.Component<
  Merge<React.HTMLProps<HTMLElement>, PickerProps>
> {}

export default Picker;
