import * as i0 from '@angular/core';
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
import { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';
import { zTransform, zMergeClasses } from '@shival99/z-ui/utils';
import { SkeletonComponent } from 'boneyard-js/angular';

class ZSkeletonAutoComponent {
    class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
    zLoading = input(false, { ...(ngDevMode ? { debugName: "zLoading" } : {}), transform: zTransform });
    zName = input('z-skeleton-auto', ...(ngDevMode ? [{ debugName: "zName" }] : []));
    zColor = input('#e0e0e0', ...(ngDevMode ? [{ debugName: "zColor" }] : []));
    zDarkColor = input('#374151', ...(ngDevMode ? [{ debugName: "zDarkColor" }] : []));
    zAnimate = input('shimmer', ...(ngDevMode ? [{ debugName: "zAnimate" }] : []));
    zWavePreset = input('legacy-strong', ...(ngDevMode ? [{ debugName: "zWavePreset" }] : []));
    zWaveDuration = input(1.5, ...(ngDevMode ? [{ debugName: "zWaveDuration" }] : []));
    zInitialBones = input(undefined, ...(ngDevMode ? [{ debugName: "zInitialBones" }] : []));
    zStagger = input(false, ...(ngDevMode ? [{ debugName: "zStagger" }] : []));
    zTransition = input(false, ...(ngDevMode ? [{ debugName: "zTransition" }] : []));
    zBoneClass = input('', ...(ngDevMode ? [{ debugName: "zBoneClass" }] : []));
    zFallbackRows = input(3, ...(ngDevMode ? [{ debugName: "zFallbackRows" }] : []));
    zFallbackGap = input(8, ...(ngDevMode ? [{ debugName: "zFallbackGap" }] : []));
    zFallbackRowHeight = input('12px', ...(ngDevMode ? [{ debugName: "zFallbackRowHeight" }] : []));
    zFallbackRadius = input('4px', ...(ngDevMode ? [{ debugName: "zFallbackRadius" }] : []));
    containerClass = computed(() => zMergeClasses('block w-full', this.class()), ...(ngDevMode ? [{ debugName: "containerClass" }] : []));
    effectiveAnimate = computed(() => {
        if (this.zWavePreset() === 'legacy-strong') {
            return false;
        }
        return this.zAnimate();
    }, ...(ngDevMode ? [{ debugName: "effectiveAnimate" }] : []));
    waveDurationStyle = computed(() => {
        const seconds = this.zWaveDuration();
        if (seconds <= 0) {
            return '1.5s';
        }
        return `${seconds}s`;
    }, ...(ngDevMode ? [{ debugName: "waveDurationStyle" }] : []));
    resolvedBoneClass = computed(() => {
        const presetClass = this.zWavePreset() === 'legacy-strong' ? 'z-skeleton-auto-bone-legacy' : '';
        const merged = zMergeClasses(presetClass, this.zBoneClass());
        if (!merged) {
            return undefined;
        }
        return merged;
    }, ...(ngDevMode ? [{ debugName: "resolvedBoneClass" }] : []));
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSkeletonAutoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.9", type: ZSkeletonAutoComponent, isStandalone: true, selector: "z-skeleton-auto", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zName: { classPropertyName: "zName", publicName: "zName", isSignal: true, isRequired: false, transformFunction: null }, zColor: { classPropertyName: "zColor", publicName: "zColor", isSignal: true, isRequired: false, transformFunction: null }, zDarkColor: { classPropertyName: "zDarkColor", publicName: "zDarkColor", isSignal: true, isRequired: false, transformFunction: null }, zAnimate: { classPropertyName: "zAnimate", publicName: "zAnimate", isSignal: true, isRequired: false, transformFunction: null }, zWavePreset: { classPropertyName: "zWavePreset", publicName: "zWavePreset", isSignal: true, isRequired: false, transformFunction: null }, zWaveDuration: { classPropertyName: "zWaveDuration", publicName: "zWaveDuration", isSignal: true, isRequired: false, transformFunction: null }, zInitialBones: { classPropertyName: "zInitialBones", publicName: "zInitialBones", isSignal: true, isRequired: false, transformFunction: null }, zStagger: { classPropertyName: "zStagger", publicName: "zStagger", isSignal: true, isRequired: false, transformFunction: null }, zTransition: { classPropertyName: "zTransition", publicName: "zTransition", isSignal: true, isRequired: false, transformFunction: null }, zBoneClass: { classPropertyName: "zBoneClass", publicName: "zBoneClass", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRows: { classPropertyName: "zFallbackRows", publicName: "zFallbackRows", isSignal: true, isRequired: false, transformFunction: null }, zFallbackGap: { classPropertyName: "zFallbackGap", publicName: "zFallbackGap", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRowHeight: { classPropertyName: "zFallbackRowHeight", publicName: "zFallbackRowHeight", isSignal: true, isRequired: false, transformFunction: null }, zFallbackRadius: { classPropertyName: "zFallbackRadius", publicName: "zFallbackRadius", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--z-skeleton-auto-wave-duration": "waveDurationStyle()" } }, ngImport: i0, template: "<boneyard-skeleton\n  [loading]=\"zLoading()\"\n  [name]=\"zName()\"\n  [initialBones]=\"zInitialBones()\"\n  [color]=\"zColor()\"\n  [darkColor]=\"zDarkColor()\"\n  [animate]=\"effectiveAnimate()\"\n  [stagger]=\"zStagger()\"\n  [transition]=\"zTransition()\"\n  [boneClass]=\"resolvedBoneClass()\"\n  [cssClass]=\"containerClass()\">\n  <ng-content />\n\n  <div fallback class=\"w-full\">\n    <z-skeleton\n      zType=\"text\"\n      class=\"w-full\"\n      [zRows]=\"zFallbackRows()\"\n      [zGap]=\"zFallbackGap()\"\n      [zHeight]=\"zFallbackRowHeight()\"\n      [zRadius]=\"zFallbackRadius()\" />\n  </div>\n</boneyard-skeleton>\n", styles: [":host{display:block}:host ::ng-deep .z-skeleton-auto-bone-legacy{position:relative;overflow:hidden}:host ::ng-deep .z-skeleton-auto-bone-legacy:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.42) 50%,transparent 100%);animation:z-skeleton-auto-legacy-wave var(--z-skeleton-auto-wave-duration, 1.5s) infinite}:host-context(.dark) ::ng-deep .z-skeleton-auto-bone-legacy:after{background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.24) 50%,transparent 100%)}@keyframes z-skeleton-auto-legacy-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "boneyard-skeleton", inputs: ["loading", "name", "initialBones", "color", "darkColor", "animate", "stagger", "transition", "boneClass", "cssClass", "snapshotConfig"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSkeletonAutoComponent, decorators: [{
            type: Component,
            args: [{ selector: 'z-skeleton-auto', imports: [SkeletonComponent, ZSkeletonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
                        '[style.--z-skeleton-auto-wave-duration]': 'waveDurationStyle()',
                    }, template: "<boneyard-skeleton\n  [loading]=\"zLoading()\"\n  [name]=\"zName()\"\n  [initialBones]=\"zInitialBones()\"\n  [color]=\"zColor()\"\n  [darkColor]=\"zDarkColor()\"\n  [animate]=\"effectiveAnimate()\"\n  [stagger]=\"zStagger()\"\n  [transition]=\"zTransition()\"\n  [boneClass]=\"resolvedBoneClass()\"\n  [cssClass]=\"containerClass()\">\n  <ng-content />\n\n  <div fallback class=\"w-full\">\n    <z-skeleton\n      zType=\"text\"\n      class=\"w-full\"\n      [zRows]=\"zFallbackRows()\"\n      [zGap]=\"zFallbackGap()\"\n      [zHeight]=\"zFallbackRowHeight()\"\n      [zRadius]=\"zFallbackRadius()\" />\n  </div>\n</boneyard-skeleton>\n", styles: [":host{display:block}:host ::ng-deep .z-skeleton-auto-bone-legacy{position:relative;overflow:hidden}:host ::ng-deep .z-skeleton-auto-bone-legacy:after{content:\"\";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.42) 50%,transparent 100%);animation:z-skeleton-auto-legacy-wave var(--z-skeleton-auto-wave-duration, 1.5s) infinite}:host-context(.dark) ::ng-deep .z-skeleton-auto-bone-legacy:after{background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.24) 50%,transparent 100%)}@keyframes z-skeleton-auto-legacy-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"] }]
        }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoading", required: false }] }], zName: [{ type: i0.Input, args: [{ isSignal: true, alias: "zName", required: false }] }], zColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "zColor", required: false }] }], zDarkColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDarkColor", required: false }] }], zAnimate: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAnimate", required: false }] }], zWavePreset: [{ type: i0.Input, args: [{ isSignal: true, alias: "zWavePreset", required: false }] }], zWaveDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "zWaveDuration", required: false }] }], zInitialBones: [{ type: i0.Input, args: [{ isSignal: true, alias: "zInitialBones", required: false }] }], zStagger: [{ type: i0.Input, args: [{ isSignal: true, alias: "zStagger", required: false }] }], zTransition: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTransition", required: false }] }], zBoneClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zBoneClass", required: false }] }], zFallbackRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFallbackRows", required: false }] }], zFallbackGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFallbackGap", required: false }] }], zFallbackRowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFallbackRowHeight", required: false }] }], zFallbackRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFallbackRadius", required: false }] }] } });

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

export { ZSkeletonAutoComponent };
//# sourceMappingURL=shival99-z-ui-components-z-skeleton-auto.mjs.map
