// #region Imports
import { html } from '../../../../Dom/Html';
import { Icons } from '../../../../Resources/Icons';
import { when } from '../../../Directives/Directives';
import { Orientation } from '../../../Types/Orientation';
import { Size } from '../../../Types/Size';
import { TextAlignment } from '../../../Types/TextAlignment';
import { Variant } from '../../../Types/Variant';
// #endregion
/**
 * The template of the {@link ErrorStateElement}.
 *
 * @public
 */
export function errorStateElementTemplate(e) {
    return html `
        <mosaik-icon part="icon"
                     .size="${Size.Giant}"
                     .data="${e.icon.trim().length > 0 ? e.icon : Icons.errorCircle}"
                     .variant="${Variant.Danger}"></mosaik-icon>
        <mosaik-stack .orientation="${Orientation.Vertical}">
            ${when(e.header, () => html `
            <mosaik-text part="header"
                         .readonly="${true}"
                         .wrap="${true}"
                         .alignment="${TextAlignment.Center}"
                         .text="${e.header}"
                         .formatter="${e.formatter}"></mosaik-text>
            `)}
            ${when(e.content, () => html `
            <mosaik-text part="content"
                         .readonly="${true}"
                         .wrap="${true}"
                         .alignment="${TextAlignment.Center}"
                         .text="${e.content}"
                         .formatter="${e.formatter}"></mosaik-text>
            `)}
            ${when(e.code, () => html `
            <mosaik-text part="code"
                         .readonly="${true}"
                         .wrap="${true}"
                         .alignment="${TextAlignment.Center}"
                         .text="${e.code}"
                         .formatter="${e.formatter}"></mosaik-text>
            `)}
            <slot></slot>
        </mosaik-stack>
        <mosaik-stack part="innerStack" .orientation="${Orientation.Horizontal}"
                      ?hidden="${!e.hasSlotContent('actions')}">
            <slot name="actions"></slot>
        </mosaik-stack>
    `;
}
//# sourceMappingURL=ErrorStateElementTemplate.js.map