// Type definitions for agate/TimePicker

import * as React from "react";
import { SkinnableProps as agate_Skinnable_SkinnableProps } from "@enact/agate/Skinnable";

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 TimePickerBaseProps {
  /**
   * The  `hour`  component of the time.
   */
  hour: number;
  /**
   * The  `meridiem`  component of the time.
   */
  meridiem: number;
  /**
   * The  `minute`  component of the time.
   */
  minute: number;
  /**
   * The order in which the component pickers are displayed.
   *
   * Should be an array of 2 or 3 strings containing one of  `'h'` ,  `'k'` ,  `'m'` , and  `'a'` .
   */
  order: string[];
  /**
   * Disables the  `TimePicker` .
   */
  disabled?: boolean;
  /**
 * The "aria-label" for the hour picker
 * 
 * If not specified, the "aria-label" for the hour picker will be
a combination of the current value and 'hour change a value with up down button'.
 */
  hourAriaLabel?: string;
  /**
 * The "aria-label" for the meridiem picker.
 * 
 * If not specified, the "aria-label" for the meridiem picker will be
a combination of the current value and 'change a value with up down button'.
 */
  meridiemAriaLabel?: string;
  /**
   * Array of meridiem labels to display.
   */
  meridiems: string[];
  /**
 * The "aria-label" for the minute picker.
 * 
 * If not specified, the "aria-label" for the minute picker will be
a combination of the current value and 'minute change a value with up down button'.
 */
  minuteAriaLabel?: string;
  /**
   * Called on changes in the  `hour`  component of the time.
   */
  onHourChange?: Function;
  /**
   * Called on changes in the  `meridiem`  component of the time.
   */
  onMeridiemChange?: Function;
  /**
   * Called on changes in the  `minute`  component of the time.
   */
  onMinuteChange?: Function;
  /**
   * Called when the component is removed while retaining focus.
   */
  onSpotlightDisappear?: Function;
  /**
   * Disables 5-way spotlight from navigating into the component.
   */
  spotlightDisabled?: boolean;
}
/**
 *   is the stateless functional time picker
component. Should not be used directly but may be composed within another component as it is
within   .
 */

export class TimePickerBase extends React.Component<
  Merge<React.HTMLProps<HTMLElement>, TimePickerBaseProps>
> {}

export interface TimePickerDecoratorProps
  extends agate_Skinnable_SkinnableProps {}
export function TimePickerDecorator<P>(
  Component: React.ComponentType<P> | string
): React.ComponentType<P & TimePickerDecoratorProps>;

export interface TimePickerProps
  extends Merge<TimePickerBaseProps, TimePickerDecoratorProps> {
  /**
   * Default value
   */
  defaultValue?: number;
  /**
   * The selected date.
   */
  value?: Date;
}
/**
 * A component that allows displaying or selecting time.
 * 
 * Set the  value   property to a standard JavaScript
 Date     object to initialize the picker.
 * 
 * By default,  `TimePicker`  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 TimePicker extends React.Component<
  Merge<React.HTMLProps<HTMLElement>, TimePickerProps>
> {}

/**
 * Converts a standard  `Date`  object into a locale-specific string.
 */
export function timeToLocaleString(time: Date): any;

export default TimePicker;
