// #region Imports
import { html } from '../../../../Dom/Html';
import { choose } from '../../../Directives/Directives';
// #endregion
/**
 * @public
 */
export function avatarElementTemplate(e) {
    return html `
        <div part="backplate">
            ${choose(e.displayMode, [
        ['image', () => html `
            <mosaik-image part="image"
                          .src="${e.src}"
                          .alt="${e.text ?? ''}"
                          ?show-pending="${true}"
                          ?disabled="${e.disabled}"
                          @failed="${() => e.src = ''}"></mosaik-image>
            `], ['icon', () => html `
            <mosaik-icon part="icon"
                        .data="${e.icon}"
                        ?disabled="${e.disabled}"></mosaik-icon>
            `], ['text', () => html `
            <mosaik-text part="text"
                        .text="${e.textAccessor(e.text)}"
                        ?disabled="${e.disabled}"></mosaik-text>
            `]
    ])}
        </div>
        <slot></slot>
        <slot name="badge"></slot>
    `;
}
//# sourceMappingURL=AvatarElementTemplate.js.map