import { jsx as _jsx } from "react/jsx-runtime";
import { Suspense } from "react";
import { CircularProgress } from "../progress/CircularProgress.js";
/**
 * **Server Component**
 *
 * This is just a convenience component to set the `fallback` to the
 * {@link CircularProgress} component.
 *
 * @example
 * Simple Example
 * ```tsx
 * import { CircularProgressSuspense } from "@react-md/core";
 * import type { ReactElement } from "react";
 * import { lazy } from "react";
 *
 * const Component = lazy(() => import('./Some/Path/To/Component'));
 *
 * function Example(): ReactElement {
 *   return (
 *     <CircularProgressSuspense>
 *       <Component />
 *     </CircularProgressSuspense>
 *   );
 * }
 * ```
 *
 * @remarks \@since 6.0.0
 */ export function CircularProgressSuspense(props) {
    const { children, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel = ariaLabelledBy ? undefined : "Loading", ...progressProps } = props;
    return /*#__PURE__*/ _jsx(Suspense, {
        fallback: /*#__PURE__*/ _jsx(CircularProgress, {
            "aria-label": ariaLabel,
            "aria-labelledby": ariaLabelledBy,
            ...progressProps
        }),
        children: children
    });
}

//# sourceMappingURL=CircularProgressSuspense.js.map