import { LitElement, } from 'lit-element';
export default class WebComponent extends LitElement {
    constructor() {
        super();
        this.addEventListener('keydown', this.handleEvent);
        this.addEventListener('input', this.handleEvent);
        this.addEventListener('mouseup', this.handleEvent);
        this.addEventListener('keyup', this.handleEvent);
        this.addEventListener('keypress', this.handleEvent);
        this.addEventListener('keydown', this.handleEvent);
        this.addEventListener('paste', this.handleEvent);
        this.addEventListener('selectionchange', this.handleEvent);
    }
    disconnectedCallback() {
        this.removeEventListener('keydown', this.handleEvent);
        this.removeEventListener('input', this.handleEvent);
        this.removeEventListener('mouseup', this.handleEvent);
        this.removeEventListener('keyup', this.handleEvent);
        this.removeEventListener('keypress', this.handleEvent);
        this.removeEventListener('keydown', this.handleEvent);
        this.removeEventListener('paste', this.handleEvent);
        this.removeEventListener('selectionchange', this.handleEvent);
    }
    handleEvent(event) {
        // Prevent event from ArenaBrowser
        event.stopPropagation();
    }
    fireChangeAttribute(attrs) {
        const event = new CustomEvent('arena-change-attribute', {
            bubbles: true,
            detail: {
                attrs,
                target: this,
            },
        });
        this.dispatchEvent(event);
    }
}
//# sourceMappingURL=WebComponent.js.map