text: define(["exports", "../../../../@polymer/polymer/polymer-element.js", "../../../../@polymer/iron-pages/iron-pages.js", "./lrnapp-studio-submission-display.js", "./lrnapp-studio-submission-edit.js", "./lrnapp-studio-submission-critique.js"], function (_exports, _polymerElement, _ironPages, _lrnappStudioSubmissionDisplay, _lrnappStudioSubmissionEdit, _lrnappStudioSubmissionCritique) {
    "use strict";
  
    Object.defineProperty(_exports, "__esModule", {
      value: true
    });
    _exports.LrnappStudioSubmissionObject = void 0;
  
    function _templateObject_e01d7ff0cf4a11e9b8b15bd4e98e0211() {
      var data = babelHelpers.taggedTemplateLiteral(["\n      <style>\n        :host {\n          display: block;\n        }\n      </style>\n      <iron-pages selected=\"[[selectedPage]]\">\n        <lrnapp-studio-submission-display\n          submission=\"{{submission}}\"\n        ></lrnapp-studio-submission-display>\n        <lrnapp-studio-submission-edit\n          submission=\"{{submission}}\"\n        ></lrnapp-studio-submission-edit>\n        <lrnapp-studio-submission-critique\n          submission=\"{{submission}}\"\n          edit=\"[[edit]]\"\n        ></lrnapp-studio-submission-critique>\n      </iron-pages>\n    "]);
  
      _templateObject_e01d7ff0cf4a11e9b8b15bd4e98e0211 = function _templateObject_e01d7ff0cf4a11e9b8b15bd4e98e0211() {
        return data;
      };
  
      return data;
    }
  
    var LrnappStudioSubmissionObject =
    /*#__PURE__*/
    function (_PolymerElement) {
      babelHelpers.inherits(LrnappStudioSubmissionObject, _PolymerElement);
  
      function LrnappStudioSubmissionObject() {
        babelHelpers.classCallCheck(this, LrnappStudioSubmissionObject);
        return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(LrnappStudioSubmissionObject).apply(this, arguments));
      }
  
      babelHelpers.createClass(LrnappStudioSubmissionObject, [{
        key: "_selectedPageChanged",
        value: function _selectedPageChanged(edit, type) {
          var selected = 0;
  
          if (edit) {
            switch (type) {
              case "default":
                selected = 1;
                break;
  
              case "critique":
                selected = 2;
                break;
            }
          } else {
            switch (type) {
              case "default":
                selected = 0;
                break;
  
              case "critique":
                selected = 2;
                break;
            }
          }
  
          this.set("selectedPage", selected);
        }
      }], [{
        key: "template",
        get: function get() {
          return (0, _polymerElement.html)(_templateObject_e01d7ff0cf4a11e9b8b15bd4e98e0211());
        }
      }, {
        key: "tag",
        get: function get() {
          return "lrnapp-studio-submission-object";
        }
      }, {
        key: "properties",
        get: function get() {
          return {
            elmslnCourse: {
              type: String
            },
            elmslnSection: {
              type: String
            },
            basePath: {
              type: String
            },
            csrfToken: {
              type: String
            },
            endPoint: {
              type: String
            },
            submission: {
              type: Object,
              value: null,
              notify: true
            },
            edit: {
              type: Boolean,
              value: false
            },
            selectedPage: {
              type: Number,
              value: 0
            }
          };
        }
      }, {
        key: "observers",
        get: function get() {
          return ["_selectedPageChanged(edit, submission.meta.submissionType)"];
        }
      }]);
      return LrnappStudioSubmissionObject;
    }(_polymerElement.PolymerElement);
  
    _exports.LrnappStudioSubmissionObject = LrnappStudioSubmissionObject;
    window.customElements.define(LrnappStudioSubmissionObject.tag, LrnappStudioSubmissionObject);
  });