/**
 * Copyright 2019 The Pennsylvania State University
 * @license Apache-2.0, see License.md for full text.
 */
class AirHorn extends HTMLElement{get html(){return"\n<style>\n:host {\n  display: inline-flex;\n}\n\n:host([hidden]) {\n  display: none;\n}\n        </style>\n<slot></slot>"}static get tag(){return"air-horn"}constructor(t=!1){super(),this.tag=AirHorn.tag,this.template=globalThis.document.createElement("template"),this.attachShadow({mode:"open"}),t||this.render(),setTimeout((()=>{this.addEventListener("click",this._playSound.bind(this))}),0)}_playSound(t){new Audio(new URL("./lib/airhorn.mp3",import.meta.url).href).play()}render(){this.shadowRoot.innerHTML=null,this.template.innerHTML=this.html,globalThis.ShadyCSS&&globalThis.ShadyCSS.prepareTemplate(this.template,this.tag),this.shadowRoot.appendChild(this.template.content.cloneNode(!0))}}customElements.define(AirHorn.tag,AirHorn);export{AirHorn};