text: define(["exports", "../../../../@polymer/polymer/polymer-element.js", "../../../materializecss-styles/materializecss-styles.js", "./lrnapp-block-recent-project.js", "./lrnapp-block-recent-submissions.js", "./lrnapp-block-recent-comments.js", "./lrnapp-block-need-feedback.js"], function (_exports, _polymerElement, _materializecssStyles, _lrnappBlockRecentProject, _lrnappBlockRecentSubmissions, _lrnappBlockRecentComments, _lrnappBlockNeedFeedback) {
    "use strict";
  
    Object.defineProperty(_exports, "__esModule", {
      value: true
    });
    _exports.LrnappStudioDashboard = void 0;
  
    var _templateObject_c3e12520012611ec9676957c409166bc;
  
    function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
  
    function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  
    var LrnappStudioDashboard = /*#__PURE__*/function (_PolymerElement) {
      babelHelpers.inherits(LrnappStudioDashboard, _PolymerElement);
  
      var _super = _createSuper(LrnappStudioDashboard);
  
      function LrnappStudioDashboard() {
        babelHelpers.classCallCheck(this, LrnappStudioDashboard);
        return _super.apply(this, arguments);
      }
  
      babelHelpers.createClass(LrnappStudioDashboard, [{
        key: "ready",
        value: function ready() {
          babelHelpers.get(babelHelpers.getPrototypeOf(LrnappStudioDashboard.prototype), "ready", this).call(this);
          window.dispatchEvent(new Event("resize"));
        }
      }, {
        key: "connectedCallback",
        value: function connectedCallback() {
          babelHelpers.get(babelHelpers.getPrototypeOf(LrnappStudioDashboard.prototype), "connectedCallback", this).call(this);
          setTimeout(function () {
            window.dispatchEvent(new Event("resize"));
          }, 1000);
        }
      }, {
        key: "_getEndPoint",
        value: function _getEndPoint(basePath) {
          return basePath + "lrnapp-studio-dashboard/blocks";
        }
      }, {
        key: "_getDataSource",
        value: function _getDataSource(csrfToken, basePath, dataPoint) {
          return basePath + "lrnapp-studio-dashboard/blocks/" + dataPoint + "?token=" + csrfToken;
        }
        /**
         * Simple way to convert from object to array.
         */
  
      }, {
        key: "_toArray",
        value: function _toArray(obj) {
          if (obj == null) {
            return [];
          }
  
          return Object.keys(obj).map(function (key) {
            return obj[key];
          });
        }
      }], [{
        key: "template",
        get: function get() {
          return (0, _polymerElement.html)(_templateObject_c3e12520012611ec9676957c409166bc || (_templateObject_c3e12520012611ec9676957c409166bc = babelHelpers.taggedTemplateLiteral(["\n      <style include=\"materializecss-styles\">\n        :host {\n          display: block;\n          padding: 0 32px;\n        }\n        h1.title {\n          font-size: 32px;\n          color: black;\n          margin: 0;\n          padding: 4px 0 0 0;\n          text-transform: none;\n          text-align: left;\n        }\n        .dashboard-row {\n          width: 100%;\n          display: inline-flex;\n          justify-content: space-evenly;\n        }\n        .dashboard-item {\n          min-width: 30%;\n        }\n        h2 {\n          font-size: 32px;\n          margin: 8px;\n          text-align: center;\n        }\n      </style>\n      <h1 class=\"title\">Welcome back [[username]]!</h1>\n      <div class=\"dashboard-row\">\n        <div class=\"dashboard-item card\">\n          <h2>Recent project</h2>\n          <div class=\"card-content\">\n            <lrnapp-block-recent-project\n              csrf-token=\"[[csrfToken]]\"\n              end-point=\"[[_getEndPoint(basePath)]]\"\n              base-path=\"[[basePath]]\"\n              source-path=\"[[_getDataSource(csrfToken, basePath,'recent-project')]]\"\n            >\n            </lrnapp-block-recent-project>\n          </div>\n        </div>\n        <div class=\"dashboard-item card\">\n          <h2>Recent submissions</h2>\n          <div class=\"card-content\">\n            <lrnapp-block-recent-submissions\n              csrf-token=\"[[csrfToken]]\"\n              end-point=\"[[_getEndPoint(basePath)]]\"\n              base-path=\"[[basePath]]\"\n              source-path=\"[[_getDataSource(csrfToken, basePath,'recent-submissions')]]\"\n            >\n            </lrnapp-block-recent-submissions>\n          </div>\n        </div>\n        <div class=\"dashboard-item card\">\n          <h2>Recent comments</h2>\n          <div class=\"card-content\">\n            <lrnapp-block-recent-comments\n              csrf-token=\"[[csrfToken]]\"\n              end-point=\"[[_getEndPoint(basePath)]]\"\n              base-path=\"[[basePath]]\"\n              source-path=\"[[_getDataSource(csrfToken, basePath,'recent-comments')]]\"\n            >\n            </lrnapp-block-recent-comments>\n          </div>\n        </div>\n      </div>\n    "])));
        }
      }, {
        key: "tag",
        get: function get() {
          return "lrnapp-studio-dashboard";
        }
      }, {
        key: "properties",
        get: function get() {
          var _ref;
  
          return _ref = {
            elmslnCourse: {
              type: String
            },
            elmslnSection: {
              type: String
            },
            basePath: {
              type: String
            },
            csrfToken: {
              type: String
            },
            endPoint: {
              type: String
            },
            username: {
              type: String,
              reflectToAttribute: true
            }
          }, babelHelpers.defineProperty(_ref, "basePath", {
            type: String,
            notify: true,
            reflectToAttribute: true
          }), babelHelpers.defineProperty(_ref, "csrfToken", {
            type: String,
            notify: true,
            reflectToAttribute: true
          }), babelHelpers.defineProperty(_ref, "sourcePath", {
            type: String,
            notify: true,
            reflectToAttribute: true
          }), _ref;
        }
      }]);
      return LrnappStudioDashboard;
    }(_polymerElement.PolymerElement);
  
    _exports.LrnappStudioDashboard = LrnappStudioDashboard;
    window.customElements.define(LrnappStudioDashboard.tag, LrnappStudioDashboard);
  });