import type { TaskInterruptionPresentation } from "@paperclipai/shared";
import { Button } from "./ui/button";
import { cn } from "../lib/utils";
import { useSecondTick } from "../hooks/useSecondTick";
import { TaskProjectAccessNotice } from "./TaskProjectAccessNotice";
/** One ordinary interruption surface. Technical records remain in diagnostics. */
export function ExecutionBlockerNotice({ presentation, canRetry, onRetry, optimistic, takingLonger, error, className, issueId, agentName, projectName }: {
presentation: TaskInterruptionPresentation | null | undefined;
canRetry: boolean;
onRetry: () => void;
optimistic?: boolean;
takingLonger?: boolean;
error?: Error | null;
className?: string;
issueId?: string;
agentName?: string;
projectName?: string;
}) {
useSecondTick(presentation?.state === "retry_scheduled");
if (presentation?.projectAccess && !optimistic && !takingLonger) return