import { html } from "../util.js"; class PxmePending extends HTMLElement { connectedCallback() { this.render(); } render() { const title = this.getAttribute("title") || "Your account is awaiting approval."; const message = this.getAttribute("message") || "An administrator needs to approve your account before you can view the gallery and images."; const email = this.getAttribute("email") || ""; this.innerHTML = html`

Approval required

${title}

${message}

${email ? `

Signed in as ${email}

` : ""}
`; this.querySelector('#signout-btn').addEventListener('click', async () => { await fetch('/auth/signout', { method: 'POST' }); window.location.href = '/'; }); } } customElements.define("pxme-pending", PxmePending);