/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-9f40d0e
 * Released under the MIT license.
 */

import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
import { tasty } from '../../../tasty/index.js';
import { Block } from '../../Block.js';
import { InternalSpinner } from './InternalSpinner.js';
const SpinContainer = tasty(Block, { styles: { lineHeight: '0' } });
export function Spin(props) {
    const { size = 'default', spinning = true, children, styles } = props;
    if (!spinning) {
        return _jsx(_Fragment, { children: children });
    }
    return (_jsx(SpinContainer, { styles: styles, children: _jsx(InternalSpinner, { size: size }) }));
}

        