text: /**
   * Copyright 2020 The Pennsylvania State University
   * @license Apache-2.0, see License.md for full text.
   */
  import{LitElement as e}from"../../../lit/index.js";import{IntersectionObserver as t}from"../../intersection-element/lib/IntersectionObserverMixin.js";class LrsEmitter extends(t(e)){static get haxProperties(){return{canScale:!0,canPosition:!0,canEditSource:!0,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:!1,icon:"icons:android"}],advanced:[]}}}static get properties(){return{...super.properties,verb:{type:String},object:{type:String},event:{type:String}}}constructor(){super(),this.verb="",this.event="click",this.object=""}updated(e){super.updated&&super.updated(e),e.forEach(((e,t)=>{"elementVisible"==t&&this.elementVisible&&"view"==this.event&&this._viewEventHandler(),"click"==this.event&&this.addEventListener("click",this._clickEventHandler.bind(this))}))}static get tag(){return"lrs-emitter"}_clickEventHandler(e){this.dispatchEvent(new CustomEvent("lrs-emitter",{bubbles:!0,cancelable:!0,detail:{verb:this.verb,object:this.object}}))}_viewEventHandler(){this.dispatchEvent(new CustomEvent("lrs-emitter",{bubbles:!0,cancelable:!0,detail:{verb:this.verb,object:this.object}}))}}window.customElements.define(LrsEmitter.tag,LrsEmitter);export{LrsEmitter};