import { html, render } from "/js/lib/lit-html.js"; import { Component, getChildrenFragment } from "/js/components/component.js"; import "/js/components/app-icon.js"; import { classnames } from "/js/utils.js"; class HiddenRepliesSection extends Component { connectedCallback() { if (this.initialized) { return; } this.expanded = false; this._children = getChildrenFragment(this); this.innerHTML = ""; this.render(); this.initialized = true; } render() { render( html`
this.toggle()} @keydown=${(e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); e.stopPropagation(); this.toggle(); } }} >
Show more replies
`, this, ); const toggleContent = this.querySelector(".toggle-content"); if (toggleContent) { toggleContent.appendChild(this._children); } } toggle() { this.expanded = !this.expanded; this.render(); } } HiddenRepliesSection.register();