import { AlertTriangle, Info } from "lucide-react"; import type { ReactNode } from "react"; import AdvancedOptionsPanel from "./AdvancedOptionsPanel"; import DocumentationHelpLink from "./help/DocumentationHelpLink"; import type { DocumentationHelpReference } from "./help/documentationHelp"; export type ActionBlockerReason = { summary: ReactNode; details?: ReactNode; requiredAction?: ReactNode; actor?: ReactNode; target?: ReactNode; technicalDetails?: ReactNode; }; export type ActionBlockerLabels = { requiredAction?: ReactNode; actor?: ReactNode; target?: ReactNode; technicalDetails?: ReactNode; }; type ActionBlockerHintProps = { reason: ActionBlockerReason; tone?: "info" | "warning" | "danger"; className?: string; labels?: ActionBlockerLabels; documentation?: DocumentationHelpReference; }; function joinClasses(...classes: Array) { return classes.filter(Boolean).join(" "); } export default function ActionBlockerHint({ reason, tone = "warning", className = "", labels = {}, documentation }: ActionBlockerHintProps) { const Icon = tone === "info" ? Info : AlertTriangle; const hasActionRows = Boolean(reason.requiredAction || reason.actor || reason.target); return (
); }