"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = getRoutePaths;

function _react() {
  const data = _interopRequireDefault(require("react"));

  _react = function _react() {
    return data;
  };

  return data;
}

function _lodash() {
  const data = require("lodash");

  _lodash = function _lodash() {
    return data;
  };

  return data;
}

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

function getRoutePaths(routes) {
  return (0, _lodash().uniq)(routes.reduce((memo, route) => {
    if (route.path) {
      memo.push(route.path);

      if (route.routes) {
        memo = memo.concat(getRoutePaths(route.routes));
      }
    }

    return memo;
  }, []));
}