// Type definitions for agate/RangePicker

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 RangePickerBaseProps {
  /**
 * The maximum value selectable by the picker (inclusive).
 * 
 * The range between  `min`  and  `max`  should be evenly divisible by
 step  .
 */
  max: number;
  /**
 * The minimum value selectable by the picker (inclusive).
 * 
 * The range between  `min`  and  `max`  should be evenly divisible by
 step  .
 */
  min: number;
  /**
   * Current value.
   */
  value: number;
  /**
 * 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-valuetext"?: string | number;
  /**
   * Children from which to pick.
   */
  children?: React.ReactNode;
  /**
   * Class name for component.
   */
  className?: 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 animation.
 * 
 * By default, the picker will animate transitions between items, provided a  `width`  is
defined.
 */
  noAnimation?: boolean;
  /**
   * Called when  `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;
  /**
 * The smallest value change allowed for the picker.
 * 
 * For example, a step of  `2`  would cause the picker to increment from 0 to 2 to 4, etc.
It must evenly divide into the range designated by  `min`  and  `max` .
 */
  step?: number;
  /**
 * Allows picker to continue from the start of the list after it reaches the end and
vice-versa.
 */
  wrap?: boolean;
}
/**
 * RangePicker base component.
 */

export class RangePickerBase extends React.Component<
  Merge<React.HTMLProps<HTMLElement>, RangePickerBaseProps>
> {}

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

export interface RangePickerProps
  extends Merge<RangePickerBaseProps, RangePickerDecoratorProps> {
  /**
   * Default value
   */
  defaultValue?: number;
}
/**
 * A component that lets the user select a number from a range of numbers.
 * 
 * By default,  `RangePicker`  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 RangePicker extends React.Component<
  Merge<React.HTMLProps<HTMLElement>, RangePickerProps>
> {}

export default RangePicker;
