"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const styles_1 = require("@mui/material/styles");
const classnames_1 = tslib_1.__importDefault(require("classnames"));
const react_custom_scrollbars_2_1 = require("react-custom-scrollbars-2");
const ScrollContainer_1 = require("../../constants/ScrollContainer");
const PREFIX = 'SCScrollContainer';
const classes = {
    root: `${PREFIX}-root`
};
const Root = (0, styles_1.styled)(react_custom_scrollbars_2_1.Scrollbars, {
    name: PREFIX,
    slot: 'Root',
    overridesResolver: (props, styles) => [styles.root]
})(() => ({
    position: 'relative',
    height: '100%',
    '&:hover': {
        '& div:last-child': {
            opacity: '1 !important'
        }
    }
}));
function ScrollContainer(props) {
    // PROPS
    const { children, className = {}, autoHide = ScrollContainer_1.AUTO_HIDE, autoHideTimeout = ScrollContainer_1.AUTO_HIDE_TIMEOUT } = props, rest = tslib_1.__rest(props, ["children", "className", "autoHide", "autoHideTimeout"]);
    /**
     * Example of custom styles for vertical thumb
     * Add to the root of this component:
     *  renderThumbVertical={renderThumbVertical}
     * and implement renderThumbVertical:
     *  function renderThumbVertical() {
     *    return <div style={{width: 20, backgroundColor: '#2e9696'}}></div>;
     *  }
     */
    return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ autoHideTimeout: autoHideTimeout, autoHide: autoHide, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: children })));
}
exports.default = ScrollContainer;
