"use client";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { memo } from "react";
import { cn } from "@stigmer/theme";
/**
 * Inline CTA card shown in the {@link MessageThread} after a completed
 * Plan-mode execution.
 *
 * Offers a single "Implement" action that the consumer wires to switch
 * the interaction mode to Agent, pre-fill the composer, and focus it.
 *
 * Renders nothing when `onImplement` is not provided, so the card is
 * fully opt-in from the consumer's perspective.
 *
 * All visual properties flow through `--stgm-*` tokens.
 */
export const PlanCompletionCard = memo(function PlanCompletionCard({ onImplement, disabled, className, }) {
    if (!onImplement)
        return null;
    return (_jsxs("div", { role: "status", "aria-label": "Plan complete", className: cn("mx-4 flex items-center gap-3 rounded-md border border-border/50", "bg-muted/30 px-3 py-2.5", className), children: [_jsx(PlanCompleteIcon, {}), _jsx("span", { className: "min-w-0 flex-1 text-xs font-medium text-muted-foreground", children: "Plan complete \u2014 ready to implement?" }), _jsxs("button", { type: "button", disabled: disabled, onClick: onImplement, className: cn("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5", "text-xs font-medium transition-colors", "bg-primary text-primary-foreground", "hover:bg-primary-hover", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: [_jsx(ImplementIcon, {}), "Implement"] })] }));
});
function PlanCompleteIcon() {
    return (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", className: "shrink-0 text-muted-foreground/70", "aria-hidden": "true", children: [_jsx("path", { d: "M3 4h10M3 8h7M3 12h8" }), _jsx("path", { d: "M12.5 10.5l1.5 1.5-1.5 1.5" })] }));
}
function ImplementIcon() {
    return (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M2 6h8M7 3l3 3-3 3" }) }));
}
//# sourceMappingURL=PlanCompletionCard.js.map