class MessageBottomSheet extends HTMLElement { constructor() { super(); this.attachShadow({mode: 'open'}); this.shadowRoot.innerHTML = `
`; this.messageBottomSheet = this.shadowRoot.getElementById('messageBottomSheet'); this.messageContent = this.shadowRoot.getElementById('messageContent'); this.closeMessageButton = this.shadowRoot.getElementById('closeMessage'); this.overlay = this.shadowRoot.getElementById('overlay'); this.closeMessageButton.onclick = () => this.hideMessage(); this.overlay.onclick = () => this.hideMessage(); } showMessage(message) { this.messageContent.innerHTML = message.replace(/\n/g, '