import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import classNames from 'classnames';
import { Spinner } from '../../lib/ui/Spinner/Spinner.js';
export function Button({ variant = 'outline', children, size = 'medium', disabled = false, onClick, className, onMouseDown, type = 'button', loading = false, }) {
    return (_jsxs("button", { className: classNames(`seam-btn seam-btn-${variant} seam-btn-${size}`, {
            'seam-btn-disabled': disabled,
            'seam-btn-loading': loading,
        }, className), disabled: disabled, onClick: (e) => {
            if (loading || disabled) {
                e.preventDefault();
                return;
            }
            onClick?.(e);
        }, onMouseDown: onMouseDown, type: type, children: [_jsx("span", { className: 'seam-btn-content', children: children }), loading && (_jsx("div", { className: 'seam-btn-loading', children: _jsx(Spinner, { size: 'small' }) }))] }));
}
//# sourceMappingURL=Button.js.map