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, { useContext } from 'react';
import { useEmotion, useStyles } from '../../lib/renderEnvironment/index.js';
import { ThemeContext } from '../../lib/theming/ThemeContext.js';
import { CommonWrapper } from '../../internal/CommonWrapper/index.js';
import { ResponsiveLayout } from '../ResponsiveLayout/index.js';
import { forwardRefAndName } from '../../lib/forwardRefAndName.js';
import { getStyles } from './MenuSeparator.styles.js';
export var MenuSeparatorDataTids = {
    root: 'MenuSeparator__root',
};
/**
 * `MenuSeparator` добавляет разделительную линию между элементами меню.
 *
 * Сущности в которых может быть использован `MenuSeparator`: DropdownMenu, Kebab, TooltipMenu и Select.
 */
var MenuSeparator = forwardRefAndName('MenuSeparator', function MenuSeparator(props, ref) {
    var theme = useContext(ThemeContext);
    var cx = useEmotion().cx;
    var styles = useStyles(getStyles);
    return (React.createElement(CommonWrapper, __assign({}, props),
        React.createElement(ResponsiveLayout, null, function (_a) {
            var _b;
            var isMobile = _a.isMobile;
            return (React.createElement("div", { ref: ref, "data-tid": MenuSeparatorDataTids.root, className: cx((_b = {}, _b[styles.root(theme)] = true, _b[styles.rootMobile(theme)] = isMobile, _b)) }));
        })));
});
export { MenuSeparator };
//# sourceMappingURL=MenuSeparator.js.map