/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/spreadsheet-poc-lit-element@0.0.11/my-element.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
/**
 * @license
 * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
import{LitElement,html,css,unsafeCSS}from"lit-element";import{css_gwt,css_v8addon,miapi}from"spreadsheet-poc";export class MyElement extends LitElement{static get styles(){return css`    
    
      #mislot {
        border: 1px solid green;
      }
    
      ${unsafeCSS(css_gwt)}

      ${unsafeCSS(css_v8addon)}
    `}static get properties(){return{name:{type:String},api:{type:Object},received:{type:String},count:{type:Number}}}updateSharedState(e){this.api.setState(e)}alert(e){this.api.alert(e)}constructor(){super(),this.name="World",this.count=0,this.received=""}render(){return html`
      <h1>This is a webcomponent</h1>
      <h1 style="color: blue;">&lt;my-element name="${this.name}"&gt;&lt;/my-element&gt;</h1>
      <button @click=${this._onClick} part="button">
        Click me to update the widget's shared state from the web component
      </button>
      <p>Received from widget: ${this.received}</p>
      <p>Below is the GWT widget:</p>
      <div id="mislot"></div>
      
      <slot></slot>
    `}_onClick(){this.count++,this.api.setState(this.name+" - "+this.count),console.log("Estado fijado a "+this.name)}connectedCallback(){super.connectedCallback(),console.log("connected")}updated(e){super.updated(e),console.log(this.shadowRoot.querySelector("#mislot")),this.api||(this.api=new miapi(this.shadowRoot.getElementById("mislot")),this.api.registerClicked((e=>{this.received=""+e;let t=new CustomEvent("my-event",{detail:{message:""+e}});this.dispatchEvent(t)})),this.api.alert("Hello from web component"))}attributeChangedCallback(e,t,s){console.log("attribute change: ",e,s),"name"==e&&this.api.setState(s),super.attributeChangedCallback(e,t,s)}}window.customElements.define("my-element",MyElement);
//# sourceMappingURL=/sm/f7d79e9de91010e9faa63392a49db050d446207d45467935463e7f0d71c057d4.map