import { LitElement, html, type PropertyValues, type TemplateResult, } from "lit"; import { customElement, property } from "lit/decorators.js"; import { assetUrl } from "../../../../core/AssetUrls"; import { renderNumber, translateText } from "../../../Utils"; import { PlayerInfo, RANK_TYPE_LABEL_KEYS, RankType } from "./GameInfoRanking"; const goldCoinIcon = assetUrl("images/GoldCoinIcon.svg"); @customElement("player-row") export class PlayerRow extends LitElement { @property({ type: Object }) player: PlayerInfo; @property({ type: String }) rankType: RankType; @property({ type: Number }) bestScore = 1; @property({ type: Number }) rank = 1; @property({ type: Number }) score = 0; @property({ type: Boolean }) currentPlayer = false; private failedFlag: string | null = null; createRenderRoot() { return this; } render() { if (!this.player) return html``; const { player } = this; return html`