import { MXBaseComponent, AXComponent } from '@acorex/cdk/common';
import * as i0 from '@angular/core';
import { HostBinding, Input, ViewEncapsulation, Component, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

/**
 * @category
 * A skeleton component used for loading placeholders.
 */
class AXSkeletonComponent extends MXBaseComponent {
    constructor() {
        super(...arguments);
        /**
         * Determines whether animations are enabled.
         *
         * @defaultValue true
         */
        this.animated = true;
    }
    /** @ignore */
    get __hostClass() {
        return `ax-skeleton ${this.animated ? 'ax-skeleton-animate' : ''}`;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXSkeletonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: AXSkeletonComponent, isStandalone: true, selector: "ax-skeleton", inputs: { animated: "animated" }, host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXComponent, useExisting: AXSkeletonComponent }], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["ax-skeleton{--ax-comp-skeleton-bg-color: var(--ax-sys-color-dark);--ax-comp-skeleton-bg-opacity: .2}.ax-dark ax-skeleton{--ax-comp-skeleton-bg-color: var(--ax-sys-color-light)}ax-skeleton.ax-skeleton{position:relative;display:block;overflow:hidden;background-color:rgba(var(--ax-comp-skeleton-bg-color),var(--ax-comp-skeleton-bg-opacity))}ax-skeleton.ax-skeleton-animate:before{position:absolute;inset-inline-start:-13rem;top:0;display:block;height:100%;width:var(--ax-comp-skeleton-line-width, 14rem);content:\"\";background:linear-gradient(to right,transparent 0%,rgba(var(--ax-comp-skeleton-bg-color),var(--ax-comp-skeleton-bg-opacity)) 50%,transparent 100%);animation:load 1s cubic-bezier(.4,0,.2,1) infinite}@keyframes load{0%{inset-inline-start:-13rem}to{inset-inline-start:100%}}\n"], encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXSkeletonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-skeleton', template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXSkeletonComponent }], styles: ["ax-skeleton{--ax-comp-skeleton-bg-color: var(--ax-sys-color-dark);--ax-comp-skeleton-bg-opacity: .2}.ax-dark ax-skeleton{--ax-comp-skeleton-bg-color: var(--ax-sys-color-light)}ax-skeleton.ax-skeleton{position:relative;display:block;overflow:hidden;background-color:rgba(var(--ax-comp-skeleton-bg-color),var(--ax-comp-skeleton-bg-opacity))}ax-skeleton.ax-skeleton-animate:before{position:absolute;inset-inline-start:-13rem;top:0;display:block;height:100%;width:var(--ax-comp-skeleton-line-width, 14rem);content:\"\";background:linear-gradient(to right,transparent 0%,rgba(var(--ax-comp-skeleton-bg-color),var(--ax-comp-skeleton-bg-opacity)) 50%,transparent 100%);animation:load 1s cubic-bezier(.4,0,.2,1) infinite}@keyframes load{0%{inset-inline-start:-13rem}to{inset-inline-start:100%}}\n"] }]
        }], propDecorators: { animated: [{
                type: Input
            }], __hostClass: [{
                type: HostBinding,
                args: ['class']
            }] } });

class AXSkeletonModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.9", ngImport: i0, type: AXSkeletonModule, imports: [CommonModule, AXSkeletonComponent], exports: [AXSkeletonComponent] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXSkeletonModule, imports: [CommonModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXSkeletonModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [CommonModule, AXSkeletonComponent],
                    exports: [AXSkeletonComponent],
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { AXSkeletonComponent, AXSkeletonModule };
//# sourceMappingURL=acorex-components-skeleton.mjs.map
