"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
exports.default = (function () {
    var _a = react_1.default.useState(false), isHover = _a[0], setIsHover = _a[1];
    var _b = react_1.default.useState(false), isClicked = _b[0], setIsClicked = _b[1];
    var setBoth = react_1.default.useCallback(function (v) {
        setIsHover(v);
        setIsClicked(v);
    }, [setIsHover, setIsClicked]);
    var hoverProps = react_1.default.useMemo(function () { return ({
        onMouseEnter: function () { return setIsHover(true); },
        onMouseDown: function () { return setIsClicked(true); },
        onTouchStart: function () { return setBoth(true); },
        onMouseLeave: function () { return setBoth(false); },
        onMouseUp: function () { return setIsClicked(false); },
        onTouchEnd: function () { return setBoth(false); },
        onTouchCancel: function () { return setBoth(false); },
    }); }, [setIsHover, setIsClicked, setBoth]);
    return [hoverProps, isHover, isClicked, setIsHover, setIsClicked];
});
//# sourceMappingURL=useHoverProps.js.map