"use strict";

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

var _react = _interopRequireWildcard(require("react"));

var _modularityFront = _interopRequireDefault(require("modularity-front"));

require("./App.css");

require("@trendmicro/react-sidenav/dist/react-sidenav.css");

var _logo = _interopRequireDefault(require("./logo.svg"));

var _reactMaterialize = require("react-materialize");

var _NavbarModule = _interopRequireDefault(require("./Modules/NavbarModule"));

var _Product = _interopRequireDefault(require("./Modules/Product"));

var _ProductView = _interopRequireDefault(require("./Modules/ProductView"));

var _ProductService = _interopRequireDefault(require("./Services/ProductService"));

var _FileUploader = _interopRequireDefault(require("./Modules/FileUploader"));

var _Form = _interopRequireDefault(require("./Modules/Form"));

var _Card = _interopRequireDefault(require("./Modules/Card"));

var _CarouselPanel = _interopRequireDefault(require("./Modules/CarouselPanel"));

var _Carousel = _interopRequireDefault(require("./Modules/Carousel"));

var _Table = _interopRequireDefault(require("./Modules/Table"));

var _Pagination = _interopRequireDefault(require("./Modules/Pagination"));

var _Footer = _interopRequireDefault(require("./Modules/Footer"));

var _SideNav = _interopRequireDefault(require("./Modules/SideNav"));

var _HorizontalContainer = _interopRequireDefault(require("./Modules/HorizontalContainer"));

var _View = _interopRequireDefault(require("./Modules/View"));

var _ListModule = _interopRequireDefault(require("./HigherModules/ListModule"));

var _TableData = _interopRequireDefault(require("./HigherModules/TableData"));

var _UserService = _interopRequireDefault(require("./Services/UserService"));

var _CrudService = _interopRequireDefault(require("./Services/CrudService"));

var _LoadedModulesService = _interopRequireDefault(require("./Services/LoadedModulesService"));

var _CrudListPackage = _interopRequireDefault(require("./Packages/CrudListPackage"));

var _UserPackage = _interopRequireDefault(require("./Packages/UserPackage"));

var _VerticalNavbarPackage = _interopRequireDefault(require("./Packages/VerticalNavbarPackage"));

var _miniCart = _interopRequireDefault(require("./Modules/mini-cart"));

var _VerticalNavbar = _interopRequireDefault(require("./Modules/VerticalNavbar"));

var _parallax = _interopRequireDefault(require("./Modules/parallax"));

var _Modal = _interopRequireDefault(require("./Modules/Modal"));

var _searchbar = _interopRequireDefault(require("./Modules/searchbar.js"));

var _CustomTable = _interopRequireDefault(require("./Modules/CustomTable.js"));

var _FullScreenContainer = _interopRequireDefault(require("./Modules/FullScreenContainer.js"));

var _Presentation = _interopRequireDefault(require("./Packages/Tonersales/Presentation1"));

var _ClientForm = _interopRequireDefault(require("./Modules/ClientForm"));

var _SearchBarPackage = _interopRequireDefault(require("./Packages/Tonersales/SearchBarPackage"));

var _CartPage = _interopRequireDefault(require("./Packages/Tonersales/CartPage"));

var _FiltersPackage = _interopRequireDefault(require("./Packages/FiltersPackage"));

var _Chip = _interopRequireDefault(require("./Modules/Chip"));

var _HorizontalCard = _interopRequireDefault(require("./Modules/HorizontalCard"));

var _Import = _interopRequireDefault(require("./Modules/Import"));

var _Present = _interopRequireDefault(require("./Modules/Product/Present"));

var _GoogleMap = _interopRequireDefault(require("./Modules/GoogleMap"));

var _ProductPresentPackage = _interopRequireDefault(require("./Packages/Tonersales/ProductPresentPackage"));

var _PrinterPresentPackage = _interopRequireDefault(require("./Packages/Tonersales/PrinterPresentPackage"));

var _UserAccount = _interopRequireDefault(require("./Packages/Tonersales/UserAccount"));

var _OrderPackage = _interopRequireDefault(require("./Packages/Tonersales/OrderPackage"));

var _ContactPackage = _interopRequireDefault(require("./Packages/Tonersales/ContactPackage"));

var _FilterModule = _interopRequireDefault(require("./Modules/FilterModule"));

var _Frontend = _interopRequireDefault(require("./Environments/Frontend.js"));

var _ViewOrder = _interopRequireDefault(require("./HigherModules/ViewOrder"));

var _TextEditor = _interopRequireDefault(require("./Modules/TextEditor"));

var _Modules = _interopRequireDefault(require("./Modules"));

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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _typeof(obj) { 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 _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 _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 _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); }

var Core = _modularityFront.default.Systems.getCore();

_modularityFront.default.Systems.addModule(_ProductView.default);

_modularityFront.default.Systems.addModule(_Product.default);

_modularityFront.default.Systems.addService(_ProductService.default);

_modularityFront.default.Systems.addService(_LoadedModulesService.default);

_modularityFront.default.Systems.addService(_CrudService.default);

_modularityFront.default.Systems.addService(_UserService.default);

_modularityFront.default.Systems.addModule(_UserPackage.default);

_modularityFront.default.Systems.addModule(_FileUploader.default);

_modularityFront.default.Systems.addModule(_NavbarModule.default);

_modularityFront.default.Systems.addModule(_Form.default);

_modularityFront.default.Systems.addModule(_Card.default);

_modularityFront.default.Systems.addModule(_CarouselPanel.default);

_modularityFront.default.Systems.addModule(_Carousel.default);

_modularityFront.default.Systems.addModule(_Table.default);

_modularityFront.default.Systems.addModule(_Pagination.default);

_modularityFront.default.Systems.addModule(_Footer.default);

_modularityFront.default.Systems.addModule(_SideNav.default);

_modularityFront.default.Systems.addModule(_ListModule.default);

_modularityFront.default.Systems.addModule(_View.default);

_modularityFront.default.Systems.addModule(_VerticalNavbar.default);

_modularityFront.default.Systems.addModule(_VerticalNavbarPackage.default);

_modularityFront.default.Systems.addModule(_CrudListPackage.default);

_modularityFront.default.Systems.addModule(_parallax.default);

_modularityFront.default.Systems.addModule(_Modal.default);

_modularityFront.default.Systems.addModule(_searchbar.default);

_modularityFront.default.Systems.addModule(_FilterModule.default);

_modularityFront.default.Systems.addModule(_HorizontalContainer.default);

_modularityFront.default.Systems.addModule(_HorizontalCard.default);

_modularityFront.default.Systems.addModule(_FullScreenContainer.default);

_modularityFront.default.Systems.addModule(_miniCart.default);

_modularityFront.default.Systems.addModule(_Presentation.default);

_modularityFront.default.Systems.addModule(_SearchBarPackage.default);

_modularityFront.default.Systems.addModule(_FiltersPackage.default);

_modularityFront.default.Systems.addModule(_Import.default);

_modularityFront.default.Systems.addModule(_Chip.default);

_modularityFront.default.Systems.addModule(_CartPage.default);

_modularityFront.default.Systems.addModule(_CustomTable.default);

_modularityFront.default.Systems.addModule(_ClientForm.default);

_modularityFront.default.Systems.addModule(_Present.default);

_modularityFront.default.Systems.addModule(_ProductPresentPackage.default);

_modularityFront.default.Systems.addModule(_PrinterPresentPackage.default);

_modularityFront.default.Systems.addModule(_UserAccount.default);

_modularityFront.default.Systems.addModule(_TableData.default);

_modularityFront.default.Systems.addModule(_OrderPackage.default);

_modularityFront.default.Systems.addModule(_ViewOrder.default);

_modularityFront.default.Systems.addModule(_TextEditor.default);

_modularityFront.default.Systems.addModule(_ContactPackage.default);

_modularityFront.default.Systems.addModule(_GoogleMap.default);

console.log("HERE MODULES INIT");

var App =
/*#__PURE__*/
function (_Component) {
  _inherits(App, _Component);

  function App(props) {
    var _this;

    _classCallCheck(this, App);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(App).call(this, props));
    _this.state = {
      SiteMode: localStorage.getItem("SolidLoader") == "true",
      script: {}
    };
    if (process.env.NODE_ENV !== 'production') window.addEventListener('keypress', function (e) {
      var keynum;

      if (window.event) {
        // IE                    
        keynum = e.keyCode;
      } else if (e.which) {
        // Netscape/Firefox/Opera                   
        keynum = e.which;
      }

      if (keynum === 61) {
        localStorage.setItem("AdminMode", !_this.state.SiteMode ? "" : "admin");
        localStorage.setItem("AdminVision", !_this.state.SiteMode ? "" : "admin");
        localStorage.setItem("SolidLoader", !_this.state.SiteMode);

        _this.setState({
          SiteMode: !_this.state.SiteMode
        });
      }
    });
    return _this;
  }

  _createClass(App, [{
    key: "render",
    value: function render() {
      return _react.default.createElement("div", null, _react.default.createElement("div", {
        className: "",
        key: 'App'
      }, process.env.NODE_ENV !== 'production' ? this.state.SiteMode ? _react.default.createElement(_modularityFront.default.ModuleLoader.SolidLoader, {
        script: _Frontend.default
      }) : _react.default.createElement(_modularityFront.default.ModuleLoader.MemoryLoader, null) : _react.default.createElement(_modularityFront.default.ModuleLoader.SolidLoader, {
        script: _Frontend.default
      })));
    }
  }]);

  return App;
}(_react.Component);

var _default = App;
exports.default = _default;