import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Button } from "../../../../components/ui/button";
import { cn } from "../../../../lib/utils";
import { isPromptInPlaceholderMode } from "../agentPromptPlaceholders";
export function AgentSummaryPromptActions({ prompt, hasActivePlaceholderInput, hideBottomControls, simpleMode, isExecuting, isStopGuardActive = false, isSubmitting, readOnly, onSubmit, onStop, }) {
    const isInPlaceholderMode = isPromptInPlaceholderMode({
        prompt,
        hasActivePlaceholderInput,
    });
    const placeholderShowsOwnButtons = hideBottomControls && isInPlaceholderMode;
    if (placeholderShowsOwnButtons) {
        return null;
    }
    return (_jsxs("div", { className: cn("mt-2 flex items-stretch gap-2", hideBottomControls || simpleMode || isInPlaceholderMode
            ? "justify-end"
            : "justify-between"), children: [!hideBottomControls && !simpleMode && !isInPlaceholderMode ? (_jsx("div", { className: "flex-1" })) : null, _jsx(Button, { type: "button", size: "sm", onClick: isExecuting ? onStop : onSubmit, disabled: readOnly ||
                    isStopGuardActive ||
                    (!isExecuting &&
                        !hasActivePlaceholderInput &&
                        (!prompt.trim() || isSubmitting)), title: readOnly
                    ? "Read-only access"
                    : isStopGuardActive
                        ? "Stopping agent..."
                        : undefined, "data-testid": "agent-send-stop-button", children: isExecuting ? "Stop" : "Send" })] }));
}
//# sourceMappingURL=AgentSummaryPromptActions.js.map