/* @oracle/oraclejet-preact: undefined */
'use strict';

var mergeProps = require('./mergeProps-e3da7237.js');
var useHover = require('./useHover-c099039f.js');
var useActive = require('./useActive-6770f917.js');
var useFocus = require('./useFocus-1b288fb9.js');
var usePress = require('./usePress-886180e4.js');

const DefaultActionableOptions = {
    isDisabled: false,
    isRepeat: false
};
/**
 * A hook that can add actionable support to a target element, turning it into a
 * clickable button, div, card, etc.
 * If isHover, isFocus, and isActive are only used for changing visual rendering, it would be
 * faster to not use this hook, and instead use :hover, :focus-visible, :active and usePress.
 * @param onActionHandler
 * @returns
 */
function useActionable(onActionHandler, settings = DefaultActionableOptions) {
    const mergedSettings = { ...DefaultActionableOptions, ...settings };
    const { pressProps } = usePress.usePress(onActionHandler, mergedSettings);
    const { hoverProps, isHover } = useHover.useHover({ isDisabled: mergedSettings.isDisabled });
    const { focusProps, isFocus } = useFocus.useFocus({ isDisabled: mergedSettings.isDisabled });
    const { activeProps, isActive } = useActive.useActive({ isDisabled: mergedSettings.isDisabled });
    const actionableProps = mergeProps.mergeProps(pressProps, hoverProps, activeProps, focusProps);
    return { actionableProps, isActive, isHover, isFocus };
}

exports.useActionable = useActionable;
//# sourceMappingURL=useActionable-555b845f.js.map
