"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isModuleEnabled = isModuleEnabled;
exports.getModuleConfig = getModuleConfig;
exports.Modules = void 0;
const Modules = {
  CALL_TAKER: 'call',
  FIELD_TRIP: 'ft',
  MAILABLES: 'mailables'
};
exports.Modules = Modules;

function isModuleEnabled(state, moduleName) {
  return Boolean(getModuleConfig(state, moduleName));
}

function getModuleConfig(state, moduleName) {
  var _state$otp$config, _state$otp$config$mod;

  return (_state$otp$config = state.otp.config) === null || _state$otp$config === void 0 ? void 0 : (_state$otp$config$mod = _state$otp$config.modules) === null || _state$otp$config$mod === void 0 ? void 0 : _state$otp$config$mod.find(m => m.id === moduleName);
}

//# sourceMappingURL=config.js