'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import * as React from 'react';
import { useDelay } from '../../hooks/useDelay.js';
import './index.scss';
export const ShimmerEffect = ({ animationDelay = '0ms', className, disableInlineStyles = false, height = '60px', width = '100%' })=>{
    return /*#__PURE__*/ _jsxDEV("div", {
        className: [
            'shimmer-effect',
            className
        ].filter(Boolean).join(' '),
        style: {
            height: !disableInlineStyles && (typeof height === 'number' ? `${height}px` : height),
            width: !disableInlineStyles && (typeof width === 'number' ? `${width}px` : width)
        },
        children: /*#__PURE__*/ _jsxDEV("div", {
            className: "shimmer-effect__shine",
            style: {
                animationDelay
            }
        }, void 0, false, {
            fileName: "src/elements/ShimmerEffect/index.tsx",
            lineNumber: 30,
            columnNumber: 7
        }, this)
    }, void 0, false, {
        fileName: "src/elements/ShimmerEffect/index.tsx",
        lineNumber: 23,
        columnNumber: 5
    }, this);
};
export const StaggeredShimmers = ({ className, count, height, renderDelay = 500, shimmerDelay = 25, shimmerItemClassName, width })=>{
    const shimmerDelayToPass = typeof shimmerDelay === 'number' ? `${shimmerDelay}ms` : shimmerDelay;
    const [hasDelayed] = useDelay(renderDelay, true);
    if (!hasDelayed) {
        return null;
    }
    return /*#__PURE__*/ _jsxDEV("div", {
        className: className,
        children: [
            ...Array(count)
        ].map((_, i)=>/*#__PURE__*/ _jsxDEV("div", {
                className: shimmerItemClassName,
                children: /*#__PURE__*/ _jsxDEV(ShimmerEffect, {
                    animationDelay: `calc(${i} * ${shimmerDelayToPass})`,
                    height: height,
                    width: width
                }, void 0, false, {
                    fileName: "src/elements/ShimmerEffect/index.tsx",
                    lineNumber: 70,
                    columnNumber: 11
                }, this)
            }, i, false, {
                fileName: "src/elements/ShimmerEffect/index.tsx",
                lineNumber: 69,
                columnNumber: 9
            }, this))
    }, void 0, false, {
        fileName: "src/elements/ShimmerEffect/index.tsx",
        lineNumber: 67,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map