// #region Imports
import { html } from '../../../../Dom/Html';
import { Icons } from '../../../../Resources/Icons';
import { when } from '../../../Directives/Directives';
import { Appearance } from '../../../Types/Appearance';
import { CheckType } from '../../../Types/CheckType';
import { Size } from '../../../Types/Size';
// #endregion
/**
 * @public
 */
export function chipElementTemplate(e) {
    return html `
        ${when(!e.disabled && (e.isCheckable || e.closeable), () => html `
        <mosaik-focus-ring part="focusRing"
                           .lang="${e.lang}"
                           .dir="${e.dir}"
                           .variant="${e.variant}"
                           .visible="${e.isFocused}"
                           .controlled="${'manual'}"
                           @connected="${(evt) => evt.target.attach(e)}"></mosaik-focus-ring>
        `)}
        ${when(!e.disabled && e.isCheckable && e.ripple, () => html `
        <mosaik-ripple part="ripple"
                       .lang="${e.lang}"
                       .dir="${e.dir}"
                       .variant="${e.variant}"
                       @connected="${(evt) => evt.target.attach(e)}"></mosaik-ripple>
        `)}
        ${when(e.isCheckable, () => html `
        <span part="checkmark-container" class="${e.isChecked ? 'checked' : ''}">
            <slot name="checkmark">
                <mosaik-checkmark part="checkmark"
                                  .lang="${e.lang}"
                                  .dir="${e.dir}"
                                  .appearance="${Appearance.Plain}"
                                  .variant="${e.variant}"
                                  .type="${CheckType.Hook}"
                                  ?checked="${e.isChecked}"
                                  ?disabled="${e.disabled}"></mosaik-checkmark>
            </slot>
        </span>
        `)}
        <slot name="icon">
            ${when(e.icon, () => html `
            <mosaik-icon part="icon"
                         .lang="${e.lang}"
                         .dir="${e.dir}"
                         .size="${Size.Small}"
                         .appearance="${Appearance.Plain}"
                         .variant="${e.variant}"
                         .data="${e.icon}"
                         ?disabled="${e.disabled}"></mosaik-icon>
            `)}
        </slot>
        <slot name="label">
        ${when(e.label, () => html `
            <mosaik-text part="label"
                         .lang="${e.lang}"
                         .dir="${e.dir}"
                         .text="${e.label}"
                         .variant="${e.variant}"
                         .truncate="${true}"
                         ?disabled="${e.disabled}"></mosaik-text>
        `)}
        </slot>
        <slot name="close">
        ${when(e.closeable, () => html `
            <mosaik-icon part="close"
                         .lang="${e.lang}"
                         .dir="${e.dir}"
                         .size="${Size.Small}"
                         .appearance="${Appearance.Plain}"
                         .variant="${e.variant}"
                         .data="${Icons.dismissCircle}"
                         .inline="${true}"
                         ?disabled="${e.disabled}"
                         @click="${(x) => e.onCloseClick(x)}"></mosaik-icon>
        `)}
        </slot>
    `;
}
//# sourceMappingURL=ChipElementTemplate.js.map