import { LitElement, html } from "lit"; import { customElement, property } from "lit/decorators.js"; @customElement("player-stats-grid") export class PlayerStatsGrid extends LitElement { createRenderRoot() { return this; } @property({ type: Array }) titles: string[] = []; @property({ type: Array }) values: Array = []; // Currently fixed to display 4 stats (can be changed if needed) private readonly VISIBLE_STATS_COUNT = 4; render() { return html` ${Array(this.VISIBLE_STATS_COUNT) .fill(0) .map( (_, i) => html` ${this.values[i] ?? ""} ${this.titles[i] ?? ""} `, )} `; } }