// SPDX-FileCopyrightText: 2024 John Livingston // // SPDX-License-Identifier: AGPL-3.0-only import type { LivechatTokenListElement } from '../token-list' import { html, TemplateResult } from 'lit' import { unsafeHTML } from 'lit/directives/unsafe-html.js' import { repeat } from 'lit/directives/repeat.js' import { ptTr } from '../../directives/translation' import { AddSVG, RemoveSVG } from '../../buttons' export function tplTokenList (el: LivechatTokenListElement): TemplateResult { return html`
${ repeat(el.tokenList ?? [], (token) => token.id, (token) => { html`` }) }
${ptTr(LOC_TOKEN_LABEL)} ${ptTr(LOC_TOKEN_JID)} ${ptTr(LOC_TOKEN_PASSWORD)}
${ el.mode === 'select' ? html`` : '' } ${token.label} ${token.jid} ${token.password}
` }