"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.renderWithRouter = exports.withRouter = void 0;

var _react = _interopRequireDefault(require("react"));

var _reactRouterDom = require("react-router-dom");

var _componentsTestUtils = require("@looker/components-test-utils");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var withRouter = function withRouter(children) {
  var initialEntries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['/'];
  return _react.default.createElement(_reactRouterDom.MemoryRouter, {
    initialEntries: initialEntries
  }, children);
};

exports.withRouter = withRouter;

var renderWithRouter = (children, initialEntries, options) => (0, _componentsTestUtils.renderWithTheme)(withRouter(children, initialEntries), options);

exports.renderWithRouter = renderWithRouter;
//# sourceMappingURL=router.js.map