"use strict";

exports.__esModule = true;
exports.useScopeSelect = exports.default = void 0;
var _reactRedux = require("react-redux");
var _urlPattern = _interopRequireDefault(require("url-pattern"));
var _navigation = require("../../selectors/navigation");
var _useNavigationHandler = _interopRequireDefault(require("../../hooks/useNavigationHandler"));
var _utils = require("../../utils");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var useScopeSelect = exports.useScopeSelect = function useScopeSelect(id) {
  var pattern = new _urlPattern.default((0, _reactRedux.useSelector)(_navigation.selectRoutePath));
  var params = (0, _utils.unwrapImmutable)((0, _reactRedux.useSelector)(_navigation.selectRouteParams));
  params.scope = id;
  return (0, _useNavigationHandler.default)(pattern.stringify(params));
};
__signature__(useScopeSelect, "useSelector{}\nuseSelector{}\nuseNavigationHandler{}", function () {
  return [_reactRedux.useSelector, _reactRedux.useSelector, _useNavigationHandler.default];
});
__signature__(useScopeSelect, "useSelector{}\nuseSelector{}\nuseNavigationHandler{}", function () {
  return [_reactRedux.useSelector, _reactRedux.useSelector, _useNavigationHandler.default];
});
var _default = useScopeSelect;
var _default2 = _default;
var _default3 = exports.default = _default2;
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(useScopeSelect, "useScopeSelect", "/home/vsts/work/1/s/src/components/Scope/useScopeSelect.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Scope/useScopeSelect.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(useScopeSelect, "useScopeSelect", "/home/vsts/work/1/s/src/components/Scope/useScopeSelect.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Scope/useScopeSelect.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();