import { html, LitElement, nothing } from "lit"; import { customElement, property } from "lit/decorators.js"; import { translateCosmetic } from "../Cosmetics"; import { translateText } from "../Utils"; const rarityColors: Record = { common: "text-white/60", uncommon: "text-green-400", rare: "text-blue-400", epic: "text-purple-300", legendary: "text-orange-400", }; @customElement("cosmetic-info") export class CosmeticInfo extends LitElement { @property({ type: String }) artist?: string; @property({ type: String }) rarity?: string; @property({ type: String }) colorPalette?: string; createRenderRoot() { return this; } render() { if (!this.artist && !this.rarity && !this.colorPalette) { return nothing; } const rarityColor = rarityColors[this.rarity ?? ""] ?? "text-white/70"; return html`
e.stopPropagation()} >
?
`; } }