'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getOpenModalName = exports.getNotifications = exports.getSearchToRelateVocabulary = exports.getSearchToRelateRecordType = exports.getSearchToRelateKeyword = exports.getSearchToRelateAdvanced = exports.getRelationFindResult = exports.getSearchSelectedItems = exports.getSearchError = exports.getSearchResult = exports.getMostRecentSearchDescriptor = exports.getSearchState = exports.isSearchPending = exports.getQuickSearchVocabulary = exports.getQuickSearchRecordType = exports.getQuickSearchKeyword = exports.getSearchPageVocabulary = exports.getSearchPageRecordType = exports.getSearchPageKeyword = exports.getSearchPageAdvanced = exports.getIDGenerator = exports.getPartialTermSearchMatches = exports.getVocabulary = exports.getOptionList = exports.getAdminTab = exports.getUploadType = exports.getForm = exports.getSearchToRelatePageSize = exports.getSearchResultPagePageSize = exports.getSearchPanelPageSize = exports.getRecordBrowserNavBarItems = exports.isPanelCollapsed = exports.getPrefs = exports.getRelatedRecordBrowserRelatedCsid = exports.isRecordModified = exports.isRecordSavePending = exports.isRecordReadPending = exports.getNewRecordData = exports.getRecordValidationErrors = exports.getRecordSubrecordCsid = exports.getRecordError = exports.getRecordData = exports.getRecordRelationUpdatedTimestamp = exports.getLogoutResponse = exports.isLogoutPending = exports.getLoginError = exports.isLoginSuccess = exports.isLoginPending = exports.getLoginUsername = exports.getUserPerms = exports.getUserUsername = exports.getUserScreenName = exports.getAuthzRoles = exports.isAuthzRolesReadPending = exports.getAuthzResourceNames = exports.isAuthzPermsReadPending = exports.getAuthorityVocabWorkflowState = exports.getAuthorityVocabCsid = undefined;

var _redux = require('redux');

var _authz = require('./authz');

var fromAuthz = _interopRequireWildcard(_authz);

var _authority = require('./authority');

var fromAuthority = _interopRequireWildcard(_authority);

var _cspace = require('./cspace');

var _cspace2 = _interopRequireDefault(_cspace);

var _idGenerator = require('./idGenerator');

var fromIDGenerator = _interopRequireWildcard(_idGenerator);

var _searchPage = require('./searchPage');

var fromSearchPage = _interopRequireWildcard(_searchPage);

var _quickSearch = require('./quickSearch');

var fromQuickSearch = _interopRequireWildcard(_quickSearch);

var _login = require('./login');

var fromLogin = _interopRequireWildcard(_login);

var _logout = require('./logout');

var fromLogout = _interopRequireWildcard(_logout);

var _notification = require('./notification');

var fromNotification = _interopRequireWildcard(_notification);

var _optionList = require('./optionList');

var fromOptionList = _interopRequireWildcard(_optionList);

var _partialTermSearch = require('./partialTermSearch');

var fromPartialTermSearch = _interopRequireWildcard(_partialTermSearch);

var _prefs = require('./prefs');

var fromPrefs = _interopRequireWildcard(_prefs);

var _record = require('./record');

var fromRecord = _interopRequireWildcard(_record);

var _recordBrowser = require('./recordBrowser');

var fromRecordBrowser = _interopRequireWildcard(_recordBrowser);

var _searchToRelate = require('./searchToRelate');

var fromSearchToRelate = _interopRequireWildcard(_searchToRelate);

var _relation = require('./relation');

var fromRelation = _interopRequireWildcard(_relation);

var _search = require('./search');

var fromSearch = _interopRequireWildcard(_search);

var _user = require('./user');

var fromUser = _interopRequireWildcard(_user);

var _vocabulary = require('./vocabulary');

var fromVocabulary = _interopRequireWildcard(_vocabulary);

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

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

exports.default = (0, _redux.combineReducers)({
  authz: fromAuthz.default,
  authority: fromAuthority.default,
  cspace: _cspace2.default,
  idGenerator: fromIDGenerator.default,
  searchPage: fromSearchPage.default,
  quickSearch: fromQuickSearch.default,
  login: fromLogin.default,
  logout: fromLogout.default,
  optionList: fromOptionList.default,
  notification: fromNotification.default,
  partialTermSearch: fromPartialTermSearch.default,
  prefs: fromPrefs.default,
  record: fromRecord.default,
  recordBrowser: fromRecordBrowser.default,
  searchToRelate: fromSearchToRelate.default,
  relation: fromRelation.default,
  search: fromSearch.default,
  user: fromUser.default,
  vocabulary: fromVocabulary.default
});
var getAuthorityVocabCsid = exports.getAuthorityVocabCsid = function getAuthorityVocabCsid(state, recordType, vocab) {
  return fromAuthority.getVocabCsid(state.authority, recordType, vocab);
};

var getAuthorityVocabWorkflowState = exports.getAuthorityVocabWorkflowState = function getAuthorityVocabWorkflowState(state, recordType, vocab) {
  return fromAuthority.getVocabWorkflowState(state.authority, recordType, vocab);
};

var isAuthzPermsReadPending = exports.isAuthzPermsReadPending = function isAuthzPermsReadPending(state) {
  return fromAuthz.isPermsReadPending(state.authz);
};

var getAuthzResourceNames = exports.getAuthzResourceNames = function getAuthzResourceNames(state) {
  return fromAuthz.getResourceNames(state.authz);
};

var isAuthzRolesReadPending = exports.isAuthzRolesReadPending = function isAuthzRolesReadPending(state) {
  return fromAuthz.isRolesReadPending(state.authz);
};

var getAuthzRoles = exports.getAuthzRoles = function getAuthzRoles(state) {
  return fromAuthz.getRoles(state.authz);
};

var getUserScreenName = exports.getUserScreenName = function getUserScreenName(state) {
  return fromUser.getScreenName(state.user);
};

var getUserUsername = exports.getUserUsername = function getUserUsername(state) {
  return fromUser.getUsername(state.user);
};

var getUserPerms = exports.getUserPerms = function getUserPerms(state) {
  return fromUser.getPerms(state.user);
};

var getLoginUsername = exports.getLoginUsername = function getLoginUsername(state) {
  return fromLogin.getUsername(state.login);
};

var isLoginPending = exports.isLoginPending = function isLoginPending(state) {
  return fromLogin.isPending(state.login);
};

var isLoginSuccess = exports.isLoginSuccess = function isLoginSuccess(state) {
  return fromLogin.isSuccess(state.login);
};

var getLoginError = exports.getLoginError = function getLoginError(state) {
  return fromLogin.getError(state.login);
};

var isLogoutPending = exports.isLogoutPending = function isLogoutPending(state) {
  return fromLogout.isPending(state.logout);
};

var getLogoutResponse = exports.getLogoutResponse = function getLogoutResponse(state) {
  return fromLogout.getResponse(state.logout);
};

var getRecordRelationUpdatedTimestamp = exports.getRecordRelationUpdatedTimestamp = function getRecordRelationUpdatedTimestamp(state, csid) {
  return fromRecord.getRelationUpdatedTimestamp(state.record, csid);
};

var getRecordData = exports.getRecordData = function getRecordData(state, csid) {
  return fromRecord.getData(state.record, csid);
};

var getRecordError = exports.getRecordError = function getRecordError(state, csid) {
  return fromRecord.getError(state.record, csid);
};

var getRecordSubrecordCsid = exports.getRecordSubrecordCsid = function getRecordSubrecordCsid(state, csid, subrecordName) {
  return fromRecord.getSubrecordCsid(state.record, csid, subrecordName);
};

var getRecordValidationErrors = exports.getRecordValidationErrors = function getRecordValidationErrors(state, csid) {
  return fromRecord.getValidationErrors(state.record, csid);
};

var getNewRecordData = exports.getNewRecordData = function getNewRecordData(state) {
  return fromRecord.getNewData(state.record);
};

var isRecordReadPending = exports.isRecordReadPending = function isRecordReadPending(state, csid) {
  return fromRecord.isReadPending(state.record, csid);
};

var isRecordSavePending = exports.isRecordSavePending = function isRecordSavePending(state, csid) {
  return fromRecord.isSavePending(state.record, csid);
};

var isRecordModified = exports.isRecordModified = function isRecordModified(state, csid) {
  return fromRecord.isModified(state.record, csid);
};

var getRelatedRecordBrowserRelatedCsid = exports.getRelatedRecordBrowserRelatedCsid = function getRelatedRecordBrowserRelatedCsid(state, recordType) {
  return fromRecordBrowser.getRelatedRecordBrowserRelatedCsid(state.recordBrowser, recordType);
};

var getPrefs = exports.getPrefs = function getPrefs(state) {
  return state.prefs;
};

var isPanelCollapsed = exports.isPanelCollapsed = function isPanelCollapsed(state, recordType, name) {
  return fromPrefs.isPanelCollapsed(state.prefs, recordType, name);
};

var getRecordBrowserNavBarItems = exports.getRecordBrowserNavBarItems = function getRecordBrowserNavBarItems(state, recordType) {
  return fromPrefs.getRecordBrowserNavBarItems(state.prefs, recordType);
};

var getSearchPanelPageSize = exports.getSearchPanelPageSize = function getSearchPanelPageSize(state, recordType, name) {
  return fromPrefs.getSearchPanelPageSize(state.prefs, recordType, name);
};

var getSearchResultPagePageSize = exports.getSearchResultPagePageSize = function getSearchResultPagePageSize(state) {
  return fromPrefs.getSearchResultPagePageSize(state.prefs);
};

var getSearchToRelatePageSize = exports.getSearchToRelatePageSize = function getSearchToRelatePageSize(state) {
  return fromPrefs.getSearchToRelatePageSize(state.prefs);
};

var getForm = exports.getForm = function getForm(state, recordType) {
  return fromPrefs.getForm(state.prefs, recordType);
};

var getUploadType = exports.getUploadType = function getUploadType(state) {
  return fromPrefs.getUploadType(state.prefs);
};

var getAdminTab = exports.getAdminTab = function getAdminTab(state) {
  return fromPrefs.getAdminTab(state.prefs);
};

var getOptionList = exports.getOptionList = function getOptionList(state, optionListName) {
  return fromOptionList.get(state.optionList, optionListName);
};

var getVocabulary = exports.getVocabulary = function getVocabulary(state, vocabularyName) {
  return fromVocabulary.get(state.vocabulary, vocabularyName);
};

var getPartialTermSearchMatches = exports.getPartialTermSearchMatches = function getPartialTermSearchMatches(state) {
  return fromPartialTermSearch.getMatches(state.partialTermSearch);
};

var getIDGenerator = exports.getIDGenerator = function getIDGenerator(state, idGeneratorName) {
  return fromIDGenerator.get(state.idGenerator, idGeneratorName);
};

var getSearchPageAdvanced = exports.getSearchPageAdvanced = function getSearchPageAdvanced(state) {
  return fromSearchPage.getAdvanced(state.searchPage);
};

var getSearchPageKeyword = exports.getSearchPageKeyword = function getSearchPageKeyword(state) {
  return fromSearchPage.getKeyword(state.searchPage);
};

var getSearchPageRecordType = exports.getSearchPageRecordType = function getSearchPageRecordType(state) {
  return fromPrefs.getSearchPageRecordType(state.prefs);
};

var getSearchPageVocabulary = exports.getSearchPageVocabulary = function getSearchPageVocabulary(state, recordType) {
  return fromPrefs.getSearchPageVocabulary(state.prefs, recordType);
};

var getQuickSearchKeyword = exports.getQuickSearchKeyword = function getQuickSearchKeyword(state) {
  return fromQuickSearch.getKeyword(state.quickSearch);
};

var getQuickSearchRecordType = exports.getQuickSearchRecordType = function getQuickSearchRecordType(state) {
  return fromPrefs.getQuickSearchRecordType(state.prefs);
};

var getQuickSearchVocabulary = exports.getQuickSearchVocabulary = function getQuickSearchVocabulary(state, recordType) {
  return fromPrefs.getQuickSearchVocabulary(state.prefs, recordType);
};

var isSearchPending = exports.isSearchPending = function isSearchPending(state, searchName, searchDescriptor) {
  return fromSearch.isPending(state.search, searchName, searchDescriptor);
};

var getSearchState = exports.getSearchState = function getSearchState(state, searchName, searchDescriptor) {
  return fromSearch.getState(state.search, searchName, searchDescriptor);
};

var getMostRecentSearchDescriptor = exports.getMostRecentSearchDescriptor = function getMostRecentSearchDescriptor(state, searchName) {
  return fromSearch.getMostRecentDescriptor(state.search, searchName);
};

var getSearchResult = exports.getSearchResult = function getSearchResult(state, searchName, searchDescriptor) {
  return fromSearch.getResult(state.search, searchName, searchDescriptor);
};

var getSearchError = exports.getSearchError = function getSearchError(state, searchName, searchDescriptor) {
  return fromSearch.getError(state.search, searchName, searchDescriptor);
};

var getSearchSelectedItems = exports.getSearchSelectedItems = function getSearchSelectedItems(state, searchName) {
  return fromSearch.getSelectedItems(state.search, searchName);
};

var getRelationFindResult = exports.getRelationFindResult = function getRelationFindResult(state, subject, object, predicate) {
  return fromRelation.getFindResult(state.relation, subject, object, predicate);
};

var getSearchToRelateAdvanced = exports.getSearchToRelateAdvanced = function getSearchToRelateAdvanced(state) {
  return fromSearchToRelate.getAdvanced(state.searchToRelate);
};

var getSearchToRelateKeyword = exports.getSearchToRelateKeyword = function getSearchToRelateKeyword(state) {
  return fromSearchToRelate.getKeyword(state.searchToRelate);
};

var getSearchToRelateRecordType = exports.getSearchToRelateRecordType = function getSearchToRelateRecordType(state) {
  return fromSearchToRelate.getRecordType(state.searchToRelate);
};

var getSearchToRelateVocabulary = exports.getSearchToRelateVocabulary = function getSearchToRelateVocabulary(state, recordType) {
  return fromSearchToRelate.getVocabulary(state.searchToRelate, recordType);
};

var getNotifications = exports.getNotifications = function getNotifications(state) {
  return fromNotification.getNotifications(state.notification);
};

var getOpenModalName = exports.getOpenModalName = function getOpenModalName(state) {
  return fromNotification.getModal(state.notification);
};