// Type definitions for agate/TemperatureControl

import { ArcSliderProps as agate_ArcSlider_ArcSliderProps } from "@enact/agate/ArcSlider";
import * as React from "react";
import { ChangeableProps as ui_Changeable_ChangeableProps } from "@enact/ui/Changeable";
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 TemperatureControlBaseProps
  extends agate_ArcSlider_ArcSliderProps {
  /**
   * Disables TemperatureControl and becomes non-interactive.
   */
  disabled?: boolean;
  /**
   * The minimum value of the slider.
   */
  max?: number;
  /**
   * The minimum value of the slider.
   */
  min?: number;
  /**
   * Called when value is changed.
   */
  onChange?: Function;
  /**
   * The unit of the temperature(Celsius or Fahrenheit).
   */
  unit?: "Celsius" | "Fahrenheit";
  /**
   * The value of the control.
   */
  value?: number;
}
/**
 * Temperature control base component.
 */

export class TemperatureControlBase extends React.Component<
  Merge<React.HTMLProps<HTMLElement>, TemperatureControlBaseProps>
> {}

export interface TemperatureControlDecoratorProps
  extends Merge<
    ui_Changeable_ChangeableProps,
    agate_Skinnable_SkinnableProps
  > {}
export function TemperatureControlDecorator<P>(
  Component: React.ComponentType<P> | string
): React.ComponentType<P & TemperatureControlDecoratorProps>;

export interface TemperatureControlProps
  extends Merge<
    TemperatureControlBaseProps,
    TemperatureControlDecoratorProps
  > {}
/**
 * TemperatureControl with Agate styling
and  `TemperatureControlDecorator`  
applied.
 * 
 * Usage:
 * ```
<TemperatureControl
  max={30}
  min={10}
  unit="Celsius"
  value={10}
/>
```
 */

export class TemperatureControl extends React.Component<
  Merge<React.HTMLProps<HTMLElement>, TemperatureControlProps>
> {}

export default TemperatureControl;
