var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import MenuItem from '@mui/material/MenuItem';
import { ExpandedValueTooltip } from '../ExpandedValueTooltip';
export var ReactSelectOption = function (props) {
    var _a;
    var innerProps = props.innerProps, innerRef = props.innerRef, children = props.children, isFocused = props.isFocused, isSelected = props.isSelected, label = props.label, classes = props.selectProps.classes;
    return (React.createElement(MenuItem, __assign({ className: classNames(classes.option, (_a = {}, _a[classes['option--selected']] = isSelected, _a)), ref: innerRef, selected: isFocused, component: "div" }, innerProps),
        React.createElement(ExpandedValueTooltip, { value: label },
            React.createElement("div", { className: classes['option--item'] }, children))));
};
ReactSelectOption.propTypes = {
    children: PropTypes.node,
    innerProps: PropTypes.shape({
        id: PropTypes.string.isRequired,
        key: PropTypes.string,
        onClick: PropTypes.func.isRequired,
        onMouseMove: PropTypes.func.isRequired,
        onMouseOver: PropTypes.func.isRequired,
        tabIndex: PropTypes.number.isRequired
    }).isRequired,
    innerRef: PropTypes.oneOfType([
        PropTypes.oneOf([null]),
        PropTypes.func,
        PropTypes.shape({
            current: PropTypes.any.isRequired
        })
    ]),
    isFocused: PropTypes.bool.isRequired,
    isSelected: PropTypes.bool.isRequired,
    label: PropTypes.string,
    selectProps: PropTypes.shape({
        classes: PropTypes.shape({
            option: PropTypes.string,
            'option--selected': PropTypes.string
        })
    })
};
