"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListItemButton = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const ListItemButton_1 = __importDefault(require("@mui/material/ListItemButton"));
const react_1 = require("react");
const Tooltip_1 = require("../Tooltip");
exports.ListItemButton = (0, react_1.forwardRef)((props, ref) => {
    const { disabledReason, disabled, tooltipPlacement, note, withoutContainer = false, ...restProps } = props;
    const renderListItemButton = () => {
        return ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: disabled ? disabledReason : note, placement: tooltipPlacement, withoutContainer: !disabled, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ListItemButton_1.default, { ref: ref, disabled: disabled, component: "div", ...restProps, disableRipple: true }) }) }));
    };
    if (withoutContainer) {
        return renderListItemButton();
    }
    return (0, jsx_runtime_1.jsx)("li", { children: renderListItemButton() });
});
