text: (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[41],{
  
  /***/ "./resources/js/src/components/Content/Messages.js":
  /*!*********************************************************!*\
    !*** ./resources/js/src/components/Content/Messages.js ***!
    \*********************************************************/
  /*! exports provided: default */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* harmony default export */ __webpack_exports__["default"] = ({
    "auth": {
      "admin": {
        "not_found": "These credentials do not match our records.",
        "invalid": "Verification code is invalid.",
        "sent": "Verification code successfully sent."
      },
      "user": {
        "inactive": "Your account is not active. Please, contact the administrator.",
        "unauthorized": "Unauthorized",
        "sent": "Reset password link successfully sent.",
        "reset": "Your password has been successfully reset.",
        "failure": "Failure."
      }
    },
    "admins": {
      "not_found": "Admin not found.",
      "created": "Admin successfully created.",
      "updated": "Admin successfully updated.",
      "deleted": "Admin successfully deleted."
    },
    "users": {
      "not_found": "User not found.",
      "created": "User successfully created.",
      "updated": "User successfully updated.",
      "deleted": "User successfully deleted."
    },
    "roles": {
      "not_found": "Role not found.",
      "created": "Role successfully created.",
      "updated": "Role successfully updated.",
      "deleted": "Role successfully deleted."
    },
    "features": {
      "not_found": "Feature not found.",
      "created": "Feature successfully created.",
      "updated": "Feature successfully updated.",
      "deleted": "Feature successfully deleted."
    },
    "employees": {
      "not_found": "Employee not found.",
      "created": "Employee successfully created.",
      "updated": "Employee successfully updated.",
      "deleted": "Employee successfully deleted."
    },
    "members": {
      "not_found": "Member not found.",
      "created": "Member successfully created.",
      "updated": "Member successfully updated.",
      "deleted": "Member successfully deleted."
    },
    "customers": {
      "not_found": "Customer not found.",
      "created": "Customer successfully created.",
      "updated": "Customer successfully updated.",
      "deleted": "Customer successfully deleted."
    },
    "invoices": {
      "not_found": "Invoice not found.",
      "created": "Invoice successfully created.",
      "updated": "Invoice successfully updated.",
      "deleted": "Invoice successfully deleted."
    },
    "tasks": {
      "not_found": "Task not found.",
      "created": "Task successfully created.",
      "updated": "Task successfully updated.",
      "deleted": "Task successfully deleted."
    },
    "posts": {
      "not_found": "Post not found.",
      "created": "Post successfully created.",
      "updated": "Post successfully updated.",
      "deleted": "Post successfully deleted."
    },
    "products": {
      "not_found": "Product not found.",
      "created": "Product successfully created.",
      "updated": "Product successfully updated.",
      "deleted": "Product successfully deleted."
    },
    "languages": {
      "not_found": "Language not found.",
      "created": "Language successfully created.",
      "updated": "Language successfully updated.",
      "deleted": "Language successfully deleted."
    },
    "notifications": {
      "not_found": "Notification not found."
    },
    "cms": {
      "not_found": "Content not found.",
      "updated": "Content successfully updated."
    },
    "settings": {
      "not_found": "Setting not found.",
      "created": "Setting successfully created.",
      "updated": "Setting successfully updated.",
      "deleted": "Setting successfully deleted."
    }
  });
  
  /***/ }),
  
  /***/ "./resources/js/src/containers/Backend/User/Cms/Messages.js":
  /*!******************************************************************!*\
    !*** ./resources/js/src/containers/Backend/User/Cms/Messages.js ***!
    \******************************************************************/
  /*! exports provided: default */
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  __webpack_require__.r(__webpack_exports__);
  /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
  /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
  /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
  /* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/esm/react-router-dom.js");
  /* harmony import */ var reactstrap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! reactstrap */ "./node_modules/reactstrap/es/index.js");
  /* harmony import */ var _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @fortawesome/free-solid-svg-icons */ "./node_modules/@fortawesome/free-solid-svg-icons/index.es.js");
  /* harmony import */ var _fortawesome_free_regular_svg_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @fortawesome/free-regular-svg-icons */ "./node_modules/@fortawesome/free-regular-svg-icons/index.es.js");
  /* harmony import */ var _components_Backend_UI_Breadcrumb_Breadcrumb__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../components/Backend/UI/Breadcrumb/Breadcrumb */ "./resources/js/src/components/Backend/UI/Breadcrumb/Breadcrumb.js");
  /* harmony import */ var _components_UI_Titles_SpecialTitle_SpecialTitle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../components/UI/Titles/SpecialTitle/SpecialTitle */ "./resources/js/src/components/UI/Titles/SpecialTitle/SpecialTitle.js");
  /* harmony import */ var _components_UI_Titles_Subtitle_Subtitle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../components/UI/Titles/Subtitle/Subtitle */ "./resources/js/src/components/UI/Titles/Subtitle/Subtitle.js");
  /* harmony import */ var _components_Error_Error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../components/Error/Error */ "./resources/js/src/components/Error/Error.js");
  /* harmony import */ var _components_UI_CustomSpinner_CustomSpinner__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../components/UI/CustomSpinner/CustomSpinner */ "./resources/js/src/components/UI/CustomSpinner/CustomSpinner.js");
  /* harmony import */ var _components_Backend_UI_Form_Form__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../components/Backend/UI/Form/Form */ "./resources/js/src/components/Backend/UI/Form/Form.js");
  /* harmony import */ var _components_Backend_UI_Input_Input__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../components/Backend/UI/Input/Input */ "./resources/js/src/components/Backend/UI/Input/Input.js");
  /* harmony import */ var _components_UI_Button_BetweenButton_BetweenButton__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../components/UI/Button/BetweenButton/BetweenButton */ "./resources/js/src/components/UI/Button/BetweenButton/BetweenButton.js");
  /* harmony import */ var _components_Feedback_Feedback__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../../components/Feedback/Feedback */ "./resources/js/src/components/Feedback/Feedback.js");
  /* harmony import */ var _store_actions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../store/actions */ "./resources/js/src/store/actions/index.js");
  /* harmony import */ var _shared_utility__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../shared/utility */ "./resources/js/src/shared/utility.js");
  /* harmony import */ var _components_Content_Messages__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../components/Content/Messages */ "./resources/js/src/components/Content/Messages.js");
  
  
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
  
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  
  function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
  
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
  
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
  
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
  
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  
  function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
  
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
  
  
  
  
  
  
   // Components
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  var Separator = function Separator(_ref) {
    var sm = _ref.sm;
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Col"], {
      xs: 12,
      className: "mb-".concat(sm ? 2 : 3)
    });
  };
  
  var SubNavLinks = function SubNavLinks(_ref2) {
    var messages = _ref2.messages,
        language = _ref2.language;
  
    var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])(language.abbr + '-auth'),
        _useState2 = _slicedToArray(_useState, 2),
        activeTab = _useState2[0],
        setActiveTab = _useState2[1];
  
    var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])(messages),
        _useState4 = _slicedToArray(_useState3, 2),
        value = _useState4[0],
        setValue = _useState4[1];
  
    var toggle = function toggle(tab) {
      if (activeTab !== tab) setActiveTab(tab);
    };
  
    var _onChange = function onChange(e) {
      var valueCopy = _objectSpread({}, value);
  
      for (var _len = arguments.length, deepness = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        deepness[_key - 1] = arguments[_key];
      }
  
      if (deepness.length === 1) {
        valueCopy[deepness[0]] = e.target.value;
        return setValue(valueCopy);
      }
  
      var subValues = [];
  
      var subValue = _objectSpread({}, value);
  
      for (var i = 0; i < deepness.length - 1; i++) {
        var element = deepness[i];
        subValue = subValue[element];
        subValues.push(subValue);
      }
  
      subValues[subValues.length - 1][deepness[deepness.length - 1]] = e.target.value;
  
      for (var _i2 = 1; _i2 < deepness.length - 1; _i2++) {
        var _element = deepness[deepness.length - 1 - _i2];
        var index = subValues.length - 1 - _i2;
        subValues[index][_element] = subValues[index + 1];
      }
  
      valueCopy[deepness[0]] = subValues[0];
      setValue(valueCopy);
    };
  
    var recursiveDeepness = function recursiveDeepness(paramItem, paramName, paramValue, paramDeepness) {
      var paramPrepends = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
      var paramAppends = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];
      return Object.keys(paramItem).map(function (item) {
        var mainItem = paramItem[item];
        var mainName = "".concat(paramName, "[").concat(item, "]");
        var mainValue = paramValue[item];
        var mainDeepness = paramDeepness.concat(item);
        var prepend;
        var findPrepend = paramPrepends.find(function (el) {
          return new RegExp(el.regex.replace(/\[/g, '\\[').replace(/\]/g, '\\]')).test(mainName);
        });
        prepend = !findPrepend ? null : findPrepend.action(mainItem);
        var append;
        var findAppend = paramAppends.find(function (el) {
          return new RegExp(el.regex.replace(/\[/g, '\\[').replace(/\]/g, '\\]')).test(mainName);
        });
        append = !findAppend ? null : findAppend.action(mainItem);
        return typeof mainItem === 'string' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, prepend, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_Backend_UI_Input_Input__WEBPACK_IMPORTED_MODULE_13__["default"], {
          type: "text",
          className: "col-md-6 col-lg-4",
          name: mainName,
          placeholder: mainItem,
          addon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("span", {
            className: "text-small text-700"
          }, mainItem),
          onChange: function onChange(e) {
            return _onChange.apply(void 0, [e].concat(_toConsumableArray(mainDeepness)));
          },
          value: mainValue
        }), append) : recursiveDeepness(mainItem, mainName, mainValue, mainDeepness, paramPrepends, paramAppends);
      });
    };
  
    var navItems = Object.keys(messages).map(function (key) {
      var id = "".concat(language.abbr, "-").concat(key);
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["NavItem"], {
        key: id
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["NavLink"], {
        className: activeTab === id && 'active',
        onClick: function onClick() {
          return toggle(id);
        }
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("span", {
        className: "text-capitalize"
      }, key)));
    });
    var prefix = "".concat(language.abbr, "[messages]");
    var authItem = _components_Content_Messages__WEBPACK_IMPORTED_MODULE_18__["default"]['auth'];
    var authName = "".concat(prefix, "[auth]");
    var authValue = value['auth'];
    var authDeepness = ['auth'];
    var auth = recursiveDeepness(authItem, authName, authValue, authDeepness, [{
      regex: "".concat(authName, "[admin][not_found]"),
      action: function action() {
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Col"], {
          xs: 12
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("h4", null, "Admin"));
      }
    }, {
      regex: "".concat(authName, "[user][inactive]"),
      action: function action() {
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Separator, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Col"], {
          xs: 12
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("h4", null, "User")));
      }
    }]);
    var resourceTabPanes = ['admins', 'users', 'roles', 'features', 'members', 'customers', 'invoices', 'tasks', 'posts', 'products', 'languages', 'notifications', 'cms', 'settings'].map(function (item) {
      var currentItem = _components_Content_Messages__WEBPACK_IMPORTED_MODULE_18__["default"][item];
      var currentName = "".concat(prefix, "[").concat(item, "]");
      var currentValue = value[item];
      var currentDeepness = [item];
      var current = recursiveDeepness(currentItem, currentName, currentValue, currentDeepness);
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["TabPane"], {
        key: Math.random(),
        tabId: "".concat(language.abbr, "-").concat(item),
        className: "pt-4"
      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Row"], null, current));
    });
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Nav"], {
      tabs: true,
      pills: true
    }, navItems), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["TabContent"], {
      activeTab: activeTab
    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["TabPane"], {
      tabId: language.abbr + '-auth',
      className: "pt-4"
    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Row"], null, auth)), resourceTabPanes));
  };
  
  var Messages = /*#__PURE__*/function (_Component) {
    _inherits(Messages, _Component);
  
    var _super = _createSuper(Messages);
  
    function Messages() {
      var _this;
  
      _classCallCheck(this, Messages);
  
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
  
      _this = _super.call.apply(_super, [this].concat(args));
  
      _defineProperty(_assertThisInitialized(_this), "state", {
        activeTab: process.env.MIX_DEFAULT_LANG
      });
  
      _defineProperty(_assertThisInitialized(_this), "submitHandler", /*#__PURE__*/function () {
        var _ref3 = _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(e) {
          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
            while (1) {
              switch (_context.prev = _context.next) {
                case 0:
                  e.preventDefault();
                  _context.next = 3;
                  return _this.props.patch(e.target);
  
                case 3:
                case "end":
                  return _context.stop();
              }
            }
          }, _callee);
        }));
  
        return function (_x) {
          return _ref3.apply(this, arguments);
        };
      }());
  
      _defineProperty(_assertThisInitialized(_this), "inputChangeHandler", function (e) {
        var _e$target = e.target,
            name = _e$target.name,
            value = _e$target.value,
            files = _e$target.files;
  
        _this.setState(_defineProperty({}, name, files ? files[0] : value));
      });
  
      _defineProperty(_assertThisInitialized(_this), "fileUpload", function () {
        return document.getElementById('logo').click();
      });
  
      _defineProperty(_assertThisInitialized(_this), "toggle", function (tab) {
        if (_this.state.activeTab !== tab) _this.setState({
          activeTab: tab
        });
      });
  
      return _this;
    }
  
    _createClass(Messages, [{
      key: "componentDidMount",
      value: function () {
        var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2() {
          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {
            while (1) {
              switch (_context2.prev = _context2.next) {
                case 0:
                  this.props.reset();
                  this.props.get();
  
                case 2:
                case "end":
                  return _context2.stop();
              }
            }
          }, _callee2, this);
        }));
  
        function componentDidMount() {
          return _componentDidMount.apply(this, arguments);
        }
  
        return componentDidMount;
      }()
    }, {
      key: "componentWillUnmount",
      value: function componentWillUnmount() {
        this.props.reset();
      }
    }, {
      key: "render",
      value: function render() {
        var _this2 = this;
  
        var _this$props = this.props,
            _this$props$content$c = _this$props.content.cms.pages,
            save = _this$props$content$c.components.form.save,
            _this$props$content$c2 = _this$props$content$c.backend.pages.cms,
            title = _this$props$content$c2.title,
            messages = _this$props$content$c2.messages,
            _this$props$backend$c = _this$props.backend.cms,
            loading = _this$props$backend$c.loading,
            error = _this$props$backend$c.error,
            message = _this$props$backend$c.message,
            cms = _this$props$backend$c.cms,
            languages = _this$props$backend$c.languages,
            features = _this$props.auth.data.role.features;
        var activeTab = this.state.activeTab;
        var content = null;
        var errors = null;
        var feature = features.find(function (f) {
          return f.prefix === 'cms';
        });
        var redirect = !(feature && JSON.parse(feature.permissions).includes('u')) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__["Redirect"], {
          to: "/user/dashboard"
        });
        if (loading) content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Col"], {
          xs: 12
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_UI_CustomSpinner_CustomSpinner__WEBPACK_IMPORTED_MODULE_11__["default"], null));else {
          errors = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_Error_Error__WEBPACK_IMPORTED_MODULE_10__["default"], {
            err: error
          }));
          if (!languages) languages = [];
          var nav = languages.map(function (language) {
            return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["NavItem"], {
              key: Math.random()
            }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["NavLink"], {
              className: activeTab === language.abbr && 'active',
              onClick: function onClick() {
                return _this2.toggle(language.abbr);
              }
            }, language.name));
          });
          var tabContent = languages.map(function (language) {
            return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["TabPane"], {
              key: Math.random(),
              tabId: language.abbr
            }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(SubNavLinks, {
              messages: cms.pages[language.abbr].messages,
              language: language
            }));
          });
          content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Row"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_Backend_UI_Form_Form__WEBPACK_IMPORTED_MODULE_12__["default"], {
            onSubmit: this.submitHandler,
            icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_5__["faWrench"],
            title: messages,
            link: "/admin/cms",
            innerClassName: "row",
            className: "shadow-sm"
          }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Col"], {
            lg: 12
          }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_Feedback_Feedback__WEBPACK_IMPORTED_MODULE_15__["default"], {
            message: message
          }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Row"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("input", {
            type: "hidden",
            name: "_method",
            defaultValue: "PATCH"
          }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Col"], {
            lg: 2
          }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Nav"], {
            tabs: true,
            vertical: true,
            pills: true
          }, nav)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["Col"], {
            lg: 10
          }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_4__["TabContent"], {
            activeTab: activeTab
          }, tabContent)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", {
            className: "col-12"
          }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_UI_Button_BetweenButton_BetweenButton__WEBPACK_IMPORTED_MODULE_14__["default"], {
            color: "green",
            icon: _fortawesome_free_regular_svg_icons__WEBPACK_IMPORTED_MODULE_6__["faSave"]
          }, save)))))));
        }
        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", {
          className: "bg-soft py-4 pl-5 pr-4 position-relative"
        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_Backend_UI_Breadcrumb_Breadcrumb__WEBPACK_IMPORTED_MODULE_7__["default"], {
          main: messages,
          icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_5__["faWrench"]
        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_UI_Titles_SpecialTitle_SpecialTitle__WEBPACK_IMPORTED_MODULE_8__["default"], {
          user: true,
          icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_5__["faWrench"]
        }, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_components_UI_Titles_Subtitle_Subtitle__WEBPACK_IMPORTED_MODULE_9__["default"], {
          user: true
        }, messages)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", {
          className: "p-4 pb-0"
        }, redirect, errors, content));
      }
    }], [{
      key: "getDerivedStateFromProps",
      value: function getDerivedStateFromProps(nextProps, prevState) {
        if (nextProps.backend.cms.cms && prevState.app_name === '') {
          var messages = nextProps.backend.cms.cms.messages;
          return Object(_shared_utility__WEBPACK_IMPORTED_MODULE_17__["updateObject"])(prevState, _objectSpread({}, messages));
        }
  
        return prevState;
      }
    }]);
  
    return Messages;
  }(react__WEBPACK_IMPORTED_MODULE_1__["Component"]);
  
  var mapStateToProps = function mapStateToProps(state) {
    return _objectSpread({}, state);
  };
  
  var mapDispatchToProps = function mapDispatchToProps(dispatch) {
    return {
      get: function get() {
        return dispatch(_store_actions__WEBPACK_IMPORTED_MODULE_16__["getCms"]());
      },
      patch: function patch(data) {
        return dispatch(_store_actions__WEBPACK_IMPORTED_MODULE_16__["patchCms"]('messages', data));
      },
      reset: function reset() {
        return dispatch(_store_actions__WEBPACK_IMPORTED_MODULE_16__["resetCms"]());
      }
    };
  };
  
  /* harmony default export */ __webpack_exports__["default"] = (Object(react_router_dom__WEBPACK_IMPORTED_MODULE_3__["withRouter"])(Object(react_redux__WEBPACK_IMPORTED_MODULE_2__["connect"])(mapStateToProps, mapDispatchToProps)(Messages)));
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js")))
  
  /***/ })
  
  }]);