import * as React from 'react';

export interface FacesRatingBarProps {
  /** Applies a data-hook HTML attribute that can be used in the tests */
  dataHook?: string;
  /** Specifies a CSS class name to be appended to the component’s root element.
   * @internal
   */
  className?: string;
  /** Specifies whether the rating bar is in read only mode
   * @default false
   */
  readOnly?: boolean;
  /** Specifies the rate value descriptions’ texts. The array length must match the maxValue prop number (5 by default). */
  descriptionValues?: [string, string, string?, string?, string?];
  /** Specifies the maximum rate value.
   * @default 5
   */
  maxValue?: maxValue;
  /** Specifies the selected rate. `0` indicates undefined rating. `readOnly` mode value cannot be `0`. */
  value: facesRatingBarValues;
  /** Defines a handler that is called whenever a rating changes.
   * ##### Signature:
   * function(rating: number) => void
   * * `rating`: 1 | 2 | 3 | 4 | 5
   */
  onChange?: (rating: number) => void;
}

export default class FacesRatingBar extends React.PureComponent<FacesRatingBarProps> {}

export type facesRatingBarValues = 0 | 1 | 2 | 3 | 4 | 5;
export type maxValue = 2 | 3 | 4 | 5;
