import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button } from "./ui/button";
export const ActionButton = ({ id, isLoading, onClick, disabled = false, loadingText = "Loading...", children, type = "button", className = "", variant = "default", ...props }) => {
    return (_jsx(Button, { id: id, type: type, onClick: onClick, disabled: disabled || isLoading, className: className, variant: variant, size: "sm", ...props, children: isLoading ? (_jsxs("div", { className: "flex items-center justify-center gap-2", children: [_jsx("div", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent" }), _jsx("div", { children: loadingText })] })) : (children) }));
};
//# sourceMappingURL=ActionButton.js.map