import { Link2 } from "lucide-react";
import type { WidgetProps } from "./types";
import { ReservedControls } from "./ReservedControls";
export function JoinReviewWidget({ descriptor, onRespond }: WidgetProps) {
const options = descriptor.options ?? [];
return (
{descriptor.title && (
{descriptor.title}
)}
These joins are required by the selected tables and are shown for review.
To request a correction, use Other — specify.
{options.map((option, index) => (
{index + 1}
{option.label}
{option.detail && (
{option.detail}
)}
{option.rationale && (
Rationale
{option.rationale}
)}
))}
onRespond({
id: descriptor.id,
control,
...(text !== undefined ? { text } : {}),
})
}
/>
);
}