import {LitElement, html, unsafeHTML} from './lit-all.min.js'; import {styles} from './tf-styles.js'; class TfReactionsModalElement extends LitElement { static get properties() { return { users: {type: Object}, votes: {type: Array}, }; } static styles = styles; constructor() { super(); this.votes = []; this.users = {}; } clear() { this.votes = []; } render() { let self = this; return this.votes?.length ? html`

Reactions

×
    ${this.votes.map( (x) => html`
  • ${x?.content?.vote?.expression} ${new Date(x?.timestamp).toLocaleString()}
  • ` )}
` : undefined; } } customElements.define('tf-reactions-modal', TfReactionsModalElement);