import { bem } from "../utils/bem.js";
import { randomInt } from "../utils/randomInt.js";
/**
 * @remarks \@since 6.0.0
 */ export const skeletonPlaceholder = bem("rmd-skeleton-placeholder");
/**
 * A server-only safe util to generate a random skeleton placeholder.
 *
 * @example
 * ```tsx
 * import { skeletonPlaceholder, randomSkeletonPlaceholder } from "@react-md/core";
 * import "server-only";
 *
 * export function RandomSkeletonPlaceholder(): ReactElement {
 *   return
 *     <div
 *       style={randomSkeletonPlaceholder()}
 *       className={skeletonPlaceholder()}
 *     />
 *   );
 * }
 * ```
 * @remarks \@since 6.0.0
 */ export function randomSkeletonPlaceholder(options = {}) {
    const { minDelay = 0, maxDelay = 400, minPercentage = 40, maxPercentage = 85 } = options;
    return {
        animationDelay: `-${randomInt({
            min: minDelay,
            max: maxDelay
        })}ms`,
        width: `${randomInt({
            min: minPercentage,
            max: maxPercentage
        })}%`
    };
}

//# sourceMappingURL=skeletonPlaceholderUtils.js.map