'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-7a477838.js');
const loaderSkeletonVariation_enum = require('./loader-skeleton-variation.enum-d52ba55e.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 = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.afCount = 4;
        this.afVariation = loaderSkeletonVariation_enum.LoaderSkeletonVariation.LINE;
        this.isLoading = true;
    }
    get cssModifiers() {
        return {
            'digi-loader-skeleton--line': this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.LINE,
            'digi-loader-skeleton--header': this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.HEADER,
            'digi-loader-skeleton--text': this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.TEXT,
            'digi-loader-skeleton--circle': this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.CIRCLE,
            'digi-loader-skeleton--section': this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.SECTION,
            'digi-loader-skeleton--rounded': this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.ROUNDED
        };
    }
    render() {
        return (index.h(index.Host, { key: '286887bff51330c43bf4179355ea79c3d8376b29' }, index.h("div", { key: 'f61dfe3255772bcfaf9ea161843607efa5a4ef04', "aria-busy": "true", "aria-hidden": "true", class: Object.assign({ 'digi-loader-skeleton': true }, this.cssModifiers) }, this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.HEADER && (index.h("div", { key: 'dac4a3c06fa8ff5555b017494b645f624f49ba6f', class: "digi-loader-skeleton__item digi-loader-skeleton__item--header" })), this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.LINE && (index.h("div", { key: 'a306c0bb3a35a006bbd75dccb5ce9a4a6a57ac76', class: "digi-loader-skeleton__item digi-loader-skeleton__item--line" })), this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.TEXT &&
            Array(this.afCount)
                .fill('')
                .map(() => {
                return (index.h("div", { class: "digi-loader-skeleton__item digi-loader-skeleton__item--text" }));
            }), this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.SECTION && [
            index.h("div", { key: 'a3cc3bfa635c05bb5f9f42a4396145ff9b17febf', class: "digi-loader-skeleton__item digi-loader-skeleton__item--section-header" }),
            ...Array(this.afCount)
                .fill('')
                .map(() => (index.h("div", { class: "digi-loader-skeleton__item digi-loader-skeleton__item--section-text" })))
        ], this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.CIRCLE && (index.h("div", { key: 'c1f3ad4d455a57791b75138c8f59e8dba4d96973', class: "digi-loader-skeleton__item digi-loader-skeleton__item--circle" })), this.afVariation === loaderSkeletonVariation_enum.LoaderSkeletonVariation.ROUNDED && (index.h("div", { key: 'a96f732b59e3a36046edc1c75fdbef1dcf3bafab', class: "digi-loader-skeleton__item digi-loader-skeleton__item--rounded" })))));
    }
    get hostElement() { return index.getElement(this); }
};
LoaderSkeleton.style = DigiLoaderSkeletonStyle0;

exports.digi_loader_skeleton = LoaderSkeleton;
