import React, { forwardRef, useCallback } from "react";
import classnames from "classnames";
import { StyledOption } from "./Styles";
export const Option = /*#__PURE__*/forwardRef((_ref, ref) => {
  let {
    id,
    name,
    tooltip = "",
    hover,
    className,
    renderOption,
    onMouseEnter,
    onClick = () => null
  } = _ref;
  const handleOnMouseEnter = useCallback(() => {
    if (onMouseEnter) {
      onMouseEnter(id);
    }
  }, [onMouseEnter, id]);
  return /*#__PURE__*/React.createElement(StyledOption, {
    ref: hover ? ref : null,
    title: tooltip ? tooltip : name,
    onMouseEnter: handleOnMouseEnter,
    onTouchStart: handleOnMouseEnter,
    className: classnames("c-option", className),
    hover: hover,
    onClick: onClick
  }, renderOption ? renderOption : name);
});
Option.displayName = "Option";
//# sourceMappingURL=Option.js.map