import React, { useContext } from 'react';
import { cx } from "../../../lib/theming/Emotion";
import { ThemeContext } from "../../../lib/theming/ThemeContext";
import { CommonWrapper } from "../../../internal/CommonWrapper";
import { ResponsiveLayout } from "../../ResponsiveLayout";
import { forwardRefAndName } from "../../../lib/forwardRefAndName";
import { styles } from "../MenuSeparator.styles";
export var MenuSeparatorDataTids = {
  root: 'MenuSeparator__root'
};

/**
 * `MenuSeparator` добавляет разделительную линию между элементами меню.
 *
 * Сущности в которых может быть использован `MenuSeparator`: DropdownMenu, Kebab, TooltipMenu и Select.
 */
var MenuSeparator = forwardRefAndName('MenuSeparator', function MenuSeparator(props, ref) {
  var theme = useContext(ThemeContext);
  return /*#__PURE__*/(
    React.createElement(CommonWrapper, props, /*#__PURE__*/
    React.createElement(ResponsiveLayout, null, function (_ref) {
      var _cx;
      var isMobile = _ref.isMobile;
      return /*#__PURE__*/(
        React.createElement("div", {
          ref: ref,
          "data-tid": MenuSeparatorDataTids.root,
          className: cx((_cx = {}, _cx[styles.root(theme)] = true, _cx[styles.rootMobile(theme)] = isMobile, _cx))
        })
      );
    }))
  );
});
export { MenuSeparator };