"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useDisableClick = useDisableClick;
const react_1 = require("react");
function useDisableClick(disabled, handleClick) {
    const handleClickWrapper = (0, react_1.useCallback)((event) => {
        if (disabled) {
            event.preventDefault();
            event.stopPropagation();
        }
    }, [disabled]);
    if (!disabled) {
        return handleClick;
    }
    return handleClickWrapper;
}
//# sourceMappingURL=use-disable-interaction.js.map