/**
 * Add hover behavior to another component.
 *
 * This component provides hover and focus status updates in a consistent way
 * across desktop and mobile.
 *
 * For advice on when to use this component instead of Button, see README.md.
 *
 * Many mobile browsers treat :hover as sticky which results in buttons looking
 * pressed even when the user has lifted their finger.  This component ensures
 * that when user lifts their finger the hover state is removed.
 *
 * We also chnage how the focus state works.  Browsers immediately set the
 * focus state as soon as you click on a button.  This component only sets the
 * focus state when a user starts navigating between elements via keybaord.
 *
 * HoverBehavior accepts a function as 'children' which is passed state and
 * an object containing event handlers.  The 'children' function should return
 * an React Element of some sort.
 *
 * Example:
 *
 * class MyButtonLikeComponent extends React.Component {
 *     render(): React.Node {
 *         return <HoverBehavior
 *             disabled={this.props.disabled}
 *             onClick={this.handleClick}
 *         >
 *             {({hovered}, handlers) =>
 *                 <RoundRect
 *                      textcolor='white'
 *                      backgroundColor={hovered ? 'red' : 'blue'}/>}
 *                      {...handlers}
 *                 >
 *                      {this.props.children}
 *                 </RoundRect>
 *             }
 *         </HoverBehavior>
 *     }
 * }
 *
 * This follows a pattern call 'Function as Child Components':
 * https://medium.com/merrickchristensen/function-as-child-components-5f3920a9ace9#.sw0jiio8b
 */
import * as React from "react";
type Handlers = {
    onBlur: () => unknown;
    onClick: (e: React.MouseEvent) => unknown;
    onFocus: () => unknown;
    onMouseDown: () => unknown;
    onMouseEnter: () => unknown;
    onMouseLeave: () => unknown;
    onTouchStart: () => unknown;
    onTouchEnd: () => unknown;
};
type State = {
    focused: boolean;
    hovered: boolean;
};
type Props = {
    children?: (state: State, handlers: Handlers) => React.ReactElement;
    disabled?: boolean;
    onClick?: (e: React.MouseEvent) => unknown;
    startHovered: boolean;
    shouldUpdate: () => boolean;
};
export default class HoverBehavior extends React.Component<Props, State> {
    focusFlag: boolean;
    waitingForClick: boolean;
    static defaultProps: {
        shouldUpdate: () => boolean;
        startHovered: boolean;
    };
    constructor(props: Props);
    handleClick: (e: React.MouseEvent) => void;
    handleMouseEnter: () => void;
    handleMouseLeave: () => void;
    handleTouchStart: () => void;
    handleTouchEnd: () => void;
    handleMouseDown: () => void;
    handleBlur: () => void;
    handleFocus: () => void;
    render(): React.ReactNode;
}
export {};
