import { p as proxyCustomElement, H, h, d as Host } from './p-a53686b3.js';
import { L as LoaderSkeletonVariation } from './p-e4a9f8f0.js';

const loaderSkeletonCss = ".sc-digi-loader-skeleton-h{--digi--loader-skeleton--background:var(--digi--color--misc--skeleton);--digi--loader-skeleton--margin-bottom:var(--digi--typography--paragraph--margin--small);--digi--loader-skeleton--header-height:2rem;--digi--loader-skeleton--line-height:var(--digi--typography--body--font-size--desktop);--digi--loader-skeleton--text-height:var(--digi--typography--body--font-size--desktop);--digi--loader-skeleton--circle-height:2rem;--digi--loader-skeleton--circle-width:2rem;--digi--loader-skeleton--circle-border-radius:50%;--digi--loader-skeleton--text-margin:var(--digi--margin--h4-h6-large);--digi--loader-skeleton--header-margin:var(--digi--typography--h3--margin--small);--digi--loader-skeleton--line-margin-bottom:var(--digi--typography--paragraph--margin--small);--digi--loader-skeleton--rounded-border-radius:var(--digi--border-radius--complementary-2)}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item.sc-digi-loader-skeleton{--HEIGHT:1rem;--WIDTH:100%;--BACKGROUND-COLOR:var(--digi--loader-skeleton--background);--BORDER-RADIUS:var(--digi--border-radius--primary);--ANIMATION:var(--digi--loader-skeleton--animation, pulse 1.5s infinite);--MARGIN-BOTTOM:var(--digi--loader-skeleton--margin-bottom);background-color:var(--BACKGROUND-COLOR);width:var(--WIDTH);height:var(--HEIGHT);animation:var(--ANIMATION);border-radius:var(--BORDER-RADIUS);margin-bottom:var(--MARGIN-BOTTOM)}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--header.sc-digi-loader-skeleton{--WIDTH:50%;--HEIGHT:var(--digi--loader-skeleton--header-height);--MARGIN-BOTTOM:var(--digi--loader-skeleton--header-margin)}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--line.sc-digi-loader-skeleton{--WIDTH:100%;--HEIGHT:var(--digi--loader-skeleton--line-height);--MARGIN-BOTTOM:var(--digi--loader--skeleton--line-margin-bottom)}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--text.sc-digi-loader-skeleton{--HEIGHT:var(--digi--loader-skeleton--text-height);--MARGIN:var(--digi--loader-skeleton--text-margin);--MARGIN-BOTTOM:var(--digi--loader-skeleton--text-margin)}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--text.sc-digi-loader-skeleton:last-child{--WIDTH:75%}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--text.sc-digi-loader-skeleton:last-child{--WIDTH:75%}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--circle.sc-digi-loader-skeleton{--MARGIN-BOTTOM:var(--digi--loader-skeleton--text-margin);--WIDTH:var(--digi--loader-skeleton--circle-width);--HEIGHT:var(--digi--loader-skeleton--circle-height);--BORDER-RADIUS:var(--digi--loader-skeleton--circle-border-radius)}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--rounded.sc-digi-loader-skeleton{--BORDER-RADIUS:var(--digi--loader-skeleton--rounded-border-radius);--HEIGHT:var(--digi--loader-skeleton--header-height);--WIDTH:25%}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--section-header.sc-digi-loader-skeleton{--WIDTH:50%;--HEIGHT:var(--digi--loader-skeleton--header-height);--MARGIN-BOTTOM:var(--digi--loader-skeleton--header-margin)}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--section-text.sc-digi-loader-skeleton{--HEIGHT:var(--digi--loader-skeleton--text-height);--MARGIN:var(--digi--loader-skeleton--text-margin);--MARGIN-BOTTOM:var(--digi--loader-skeleton--text-margin)}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--section-text.sc-digi-loader-skeleton:last-child{--WIDTH:75%}.sc-digi-loader-skeleton-h .digi-loader-skeleton__item--section-text.sc-digi-loader-skeleton:last-child{--WIDTH:75%}@keyframes pulse{0%{opacity:0.2}50%{opacity:1}100%{opacity:0.4}}";
const DigiLoaderSkeletonStyle0 = loaderSkeletonCss;

const LoaderSkeleton = /*@__PURE__*/ proxyCustomElement(class LoaderSkeleton extends H {
    constructor() {
        super();
        this.__registerHost();
        this.afCount = 4;
        this.afVariation = LoaderSkeletonVariation.LINE;
        this.isLoading = true;
    }
    get cssModifiers() {
        return {
            'digi-loader-skeleton--line': this.afVariation === LoaderSkeletonVariation.LINE,
            'digi-loader-skeleton--header': this.afVariation === LoaderSkeletonVariation.HEADER,
            'digi-loader-skeleton--text': this.afVariation === LoaderSkeletonVariation.TEXT,
            'digi-loader-skeleton--circle': this.afVariation === LoaderSkeletonVariation.CIRCLE,
            'digi-loader-skeleton--section': this.afVariation === LoaderSkeletonVariation.SECTION,
            'digi-loader-skeleton--rounded': this.afVariation === LoaderSkeletonVariation.ROUNDED
        };
    }
    render() {
        return (h(Host, { key: '286887bff51330c43bf4179355ea79c3d8376b29' }, h("div", { key: 'f61dfe3255772bcfaf9ea161843607efa5a4ef04', "aria-busy": "true", "aria-hidden": "true", class: Object.assign({ 'digi-loader-skeleton': true }, this.cssModifiers) }, this.afVariation === LoaderSkeletonVariation.HEADER && (h("div", { key: 'dac4a3c06fa8ff5555b017494b645f624f49ba6f', class: "digi-loader-skeleton__item digi-loader-skeleton__item--header" })), this.afVariation === LoaderSkeletonVariation.LINE && (h("div", { key: 'a306c0bb3a35a006bbd75dccb5ce9a4a6a57ac76', class: "digi-loader-skeleton__item digi-loader-skeleton__item--line" })), this.afVariation === LoaderSkeletonVariation.TEXT &&
            Array(this.afCount)
                .fill('')
                .map(() => {
                return (h("div", { class: "digi-loader-skeleton__item digi-loader-skeleton__item--text" }));
            }), this.afVariation === LoaderSkeletonVariation.SECTION && [
            h("div", { key: 'a3cc3bfa635c05bb5f9f42a4396145ff9b17febf', class: "digi-loader-skeleton__item digi-loader-skeleton__item--section-header" }),
            ...Array(this.afCount)
                .fill('')
                .map(() => (h("div", { class: "digi-loader-skeleton__item digi-loader-skeleton__item--section-text" })))
        ], this.afVariation === LoaderSkeletonVariation.CIRCLE && (h("div", { key: 'c1f3ad4d455a57791b75138c8f59e8dba4d96973', class: "digi-loader-skeleton__item digi-loader-skeleton__item--circle" })), this.afVariation === LoaderSkeletonVariation.ROUNDED && (h("div", { key: 'a96f732b59e3a36046edc1c75fdbef1dcf3bafab', class: "digi-loader-skeleton__item digi-loader-skeleton__item--rounded" })))));
    }
    get hostElement() { return this; }
    static get style() { return DigiLoaderSkeletonStyle0; }
}, [2, "digi-loader-skeleton", {
        "afCount": [2, "af-count"],
        "afVariation": [1, "af-variation"],
        "isLoading": [32]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["digi-loader-skeleton"];
    components.forEach(tagName => { switch (tagName) {
        case "digi-loader-skeleton":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, LoaderSkeleton);
            }
            break;
    } });
}

const DigiLoaderSkeleton = LoaderSkeleton;
const defineCustomElement = defineCustomElement$1;

export { DigiLoaderSkeleton, defineCustomElement };
