/* eslint-disable lit/prefer-static-styles */
// #region Imports
import { html } from '../../../../Dom/Html';
import { RendererServiceLocator } from '../../../../Dom/Renderer';
import { when } from '../../../Directives/Directives';
// #endregion
/**
 * The template of the `ProgressRingElement`.
 *
 * @public
 */
export function progressRingElementTemplate(e) {
    return html `
        ${when(e.label.trim(), () => html `
        <slot name="label">
            <mosaik-text part="label"
                         .truncate="${true}"
                         .text="${e.label.trim()}"></mosaik-text>
        </slot>
        `)}
        ${when(e.isIndeterminate, () => html `
        <svg part="svg">
            <circle part="indeterminate" />
        </svg>
        `, () => html `
        <svg part="svg">
            <circle part="bar"></circle>
            <circle part="fill"/>
        </svg>
        `)}
        <div part="hint">
            <slot name="hint"
                  @slotchange="${(x) => x.target.assignedElements().map((y, i) => RendererServiceLocator.current.setStyle(y, 'order', i))}"></slot>
        </div>
    `;
}
//# sourceMappingURL=ProgressRingElementTemplate.js.map