import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/*
 * Copyright (c) 2023-2025 Datalayer, Inc.
 * Distributed under the terms of the Modified BSD License.
 */
import { Spinner, Text } from '@primer/react';
import { Box } from '@datalayer/primer-addons';
export const CenteredSpinner = ({ message, size = 'medium', }) => {
    return (_jsxs(Box, { sx: {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            minHeight: '40px',
        }, children: [_jsx(Spinner, { size: size }), message && _jsx(Text, { sx: { marginLeft: 3 }, children: message })] }));
};
export default CenteredSpinner;
