// #region Imports
import { html } from '../../../../Dom/Html';
import { when } from '../../../Directives/Directives';
import { Orientation } from '../../../Types/Orientation';
import { Size } from '../../../Types/Size';
// #endregion
/**
 * The template of the {@link ChatMessageElement}.
 *
 * @public
 */
export function chatMessageElementTemplate(e) {
    return html `
        <mosaik-stack part="root"
                      .dir="${e.dir}"
                      .orientation="${Orientation.Horizontal}"
                      .reverse="${!e.reply}">
            <slot name="avatar"
                  @slotchange="${(x) => e.onSlotChange(x)}"></slot>
            <div part="content">
                <slot name="message">
                    ${when(e.isBusy, () => html `
                    <div part="dots">
                        <mosaik-dot part="dot"
                                    .size="${Size.Tiny}"></mosaik-dot>
                        <mosaik-dot part="dot"
                                    .size="${Size.Tiny}"></mosaik-dot>
                        <mosaik-dot part="dot"
                                    .size="${Size.Tiny}"></mosaik-dot>
                    </div>
                    `, () => html `
                    <mosaik-text part="text"
                                 .dir="${e.dir}"
                                 .text="${e.text}"
                                 .formatter="${e.formatter}"
                                 .wrap="${true}"></mosaik-text>
                    `)}
                </slot>
                <slot name="attachment"></slot>
            </div>
        </mosaik-stack>
        <div part="reactions">
            <slot name="reaction"></slot>
        </div>
    `;
}
//# sourceMappingURL=ChatMessageElementTemplate.js.map