text: define(["exports", "../../../lit-element/lit-element.js", "../../intersection-element/lib/IntersectionObserverMixin.js"], function (_exports, _litElement, _IntersectionObserverMixin) {
    "use strict";
  
    Object.defineProperty(_exports, "__esModule", {
      value: true
    });
    _exports.LrsEmitter = void 0;
  
    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) { babelHelpers.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 _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 { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  
    /**
     * `lrs-emitter`
     * `Emit learning statements occuring in your app.`
     * @demo demo/index.html
     */
    var LrsEmitter = /*#__PURE__*/function (_IntersectionObserver) {
      babelHelpers.inherits(LrsEmitter, _IntersectionObserver);
  
      var _super = _createSuper(LrsEmitter);
  
      babelHelpers.createClass(LrsEmitter, null, [{
        key: "haxProperties",
        // haxProperty definition
        get: function get() {
          return {
            canScale: true,
            canPosition: true,
            canEditSource: true,
            gizmo: {
              title: "Lrs emitter",
              description: "Emit learning statements occuring in your app.",
              icon: "icons:android",
              color: "green",
              groups: ["Emitter"],
              handles: [{
                type: "todo:read-the-docs-for-usage"
              }],
              meta: {
                author: "elmsln",
                owner: "Penn State"
              }
            },
            settings: {
              configure: [{
                property: "verb",
                description: "",
                inputMethod: "textfield",
                required: false,
                icon: "icons:android"
              }],
              advanced: []
            }
          };
        } // properties available to the custom element for data binding
  
      }, {
        key: "properties",
        get: function get() {
          return _objectSpread(_objectSpread({}, babelHelpers.get(babelHelpers.getPrototypeOf(LrsEmitter), "properties", this)), {}, {
            verb: {
              type: String
            },
            object: {
              type: String
            },
            event: {
              type: String
            }
          });
        }
      }]);
  
      function LrsEmitter() {
        var _this;
  
        babelHelpers.classCallCheck(this, LrsEmitter);
        _this = _super.call(this);
        _this.verb = "";
        _this.event = "click";
        _this.object = "";
        return _this;
      }
  
      babelHelpers.createClass(LrsEmitter, [{
        key: "updated",
        value: function updated(changedProperties) {
          var _this2 = this;
  
          if (babelHelpers.get(babelHelpers.getPrototypeOf(LrsEmitter.prototype), "updated", this)) {
            babelHelpers.get(babelHelpers.getPrototypeOf(LrsEmitter.prototype), "updated", this).call(this, changedProperties);
          }
  
          changedProperties.forEach(function (oldValue, propName) {
            if (propName == "elementVisible" && _this2.elementVisible && _this2.event == "view") {
              _this2._viewEventHandler();
            }
  
            if (_this2.event == "click") {
              _this2.addEventListener("click", _this2._clickEventHandler.bind(_this2));
            }
          });
        }
        /**
         * Store the tag name to make it easier to obtain directly.
         * @notice function name must be here for tooling to operate correctly
         */
  
      }, {
        key: "_clickEventHandler",
        value: function _clickEventHandler(e) {
          this.dispatchEvent(new CustomEvent("lrs-emitter", {
            bubbles: true,
            cancelable: true,
            detail: {
              verb: this.verb,
              object: this.object
            }
          }));
        }
      }, {
        key: "_viewEventHandler",
        value: function _viewEventHandler() {
          this.dispatchEvent(new CustomEvent("lrs-emitter", {
            bubbles: true,
            cancelable: true,
            detail: {
              verb: this.verb,
              object: this.object
            }
          }));
        }
        /**
         * life cycle, element is removed from the DOM
         */
        //disconnectedCallback() {}
  
      }], [{
        key: "tag",
        get: function get() {
          return "lrs-emitter";
        }
      }]);
      return LrsEmitter;
    }((0, _IntersectionObserverMixin.IntersectionObserver)(_litElement.LitElement));
  
    _exports.LrsEmitter = LrsEmitter;
    window.customElements.define(LrsEmitter.tag, LrsEmitter);
  });