"use strict";var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;exports.__esModule = true;exports.MenuSeparatorDataTids = exports.MenuSeparator = void 0;var _react = _interopRequireWildcard(require("react"));

var _Emotion = require("../../lib/theming/Emotion");
var _ThemeContext = require("../../lib/theming/ThemeContext");

var _CommonWrapper = require("../../internal/CommonWrapper");
var _ResponsiveLayout = require("../ResponsiveLayout");
var _forwardRefAndName = require("../../lib/forwardRefAndName");

var _MenuSeparator = require("./MenuSeparator.styles");



var MenuSeparatorDataTids = exports.MenuSeparatorDataTids = {
  root: 'MenuSeparator__root'
};

/**
 * `MenuSeparator` добавляет разделительную линию между элементами меню.
 *
 * Сущности в которых может быть использован `MenuSeparator`: DropdownMenu, Kebab, TooltipMenu и Select.
 */
var MenuSeparator = exports.MenuSeparator = (0, _forwardRefAndName.forwardRefAndName)(
  'MenuSeparator',
  function MenuSeparator(props, ref) {
    var theme = (0, _react.useContext)(_ThemeContext.ThemeContext);

    return /*#__PURE__*/(
      _react.default.createElement(_CommonWrapper.CommonWrapper, props, /*#__PURE__*/
      _react.default.createElement(_ResponsiveLayout.ResponsiveLayout, null,
      function (_ref) {var _cx;var isMobile = _ref.isMobile;
        return /*#__PURE__*/(
          _react.default.createElement("div", {
            ref: ref,
            "data-tid": MenuSeparatorDataTids.root,
            className: (0, _Emotion.cx)((_cx = {}, _cx[_MenuSeparator.styles.root(theme)] = true, _cx[_MenuSeparator.styles.rootMobile(theme)] = isMobile, _cx)) }
          ));

      }
      )
      ));

  }
);