/*!
 * Custom elements for Nanopore-Digital Web applications
 */
import { proxyCustomElement, HTMLElement } from '@stencil/core/internal/client';

const spinnerCss = ":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:where(nano-spinner,.nano-spinner){display:inline-block;--track-size:.1em;--indicator-color:var(--nano-color-primary-1000);--track-color:var(--nano-color-neutral-300);--overlay-color:rgb(var(--nano-color-base-rgb-0) / 88%);display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--nano-spacing-xs)}:where(nano-spinner,.nano-spinner)::after{content:\"\";order:-1;font-size:1em;display:block;inline-size:1em;block-size:1em;border-radius:50%;border:solid var(--track-size) var(--track-color);border-block-start-color:var(--indicator-color);border-inline-end-color:var(--indicator-color);border-inline-start-color:var(--indicator-color);animation:1s linear infinite loading-spin}:where(nano-spinner,.nano-spinner)>:not([slot=label]){display:none}:where(nano-spinner,.nano-spinner) [slot=label]{font-size:var(--nano-font-size-sm);color:var(--nano-color-neutral-1200);display:block;text-align:center;position:relative;z-index:1}:where(nano-spinner,.nano-spinner)[overlay]:not([overlay=false]){position:absolute;inset:0;display:grid;grid-template-rows:auto auto;z-index:var(--nano-z-index-mask);justify-items:center}:where(nano-spinner,.nano-spinner)[overlay]:not([overlay=false])::before{content:\"\";order:-2;position:absolute;inset:0;background:var(--overlay-color);z-index:-1}:where(nano-spinner,.nano-spinner)[overlay]:not([overlay=false]) [slot=label]{align-self:start;grid-row:2}:where(nano-spinner,.nano-spinner)[overlay]:not([overlay=false])::after{align-self:end;grid-row:1;position:relative}@keyframes loading-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";

const Spinner = /*@__PURE__*/ proxyCustomElement(class Spinner extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
    }
    /** Displays absolutely with an overlay */
    overlay = false;
    static get style() { return spinnerCss; }
}, [0, "nano-spinner", {
        "overlay": [516]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["nano-spinner"];
    components.forEach(tagName => { switch (tagName) {
        case "nano-spinner":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, Spinner);
            }
            break;
    } });
}

export { Spinner as S, defineCustomElement as d };
