// 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) => { return html`` }) }
${ptTr(LOC_TOKEN_LABEL)} ${ptTr(LOC_TOKEN_PASSWORD)}
${ el.mode === 'select' ? html` el.selectToken(ev, token)} />` : '' }
` }