import { __rest } from '../../_virtual/_tslib.js';
import React__default, { forwardRef } from 'react';
import { handleInteractiveKeyEvent } from './utils.js';

/**
 * When creating custom elements we need to ensure the accessibility
 * using both mouse and keyboard events
 * This component is a div element with the necessary controls to assura that
 */
const Interactive = forwardRef((_a, ref) => {
    var { children, onClick } = _a, props = __rest(_a, ["children", "onClick"]);
    return (React__default.createElement("div", Object.assign({ role: "button" }, props, { ref: ref, tabIndex: 0, onClick: onClick, onKeyDown: handleInteractiveKeyEvent(onClick) }), children));
});

export { Interactive };
