/** * WidgetConfigDialog — Per-widget settings dialog. * * Reads configSchema from the widget definition. When the schema is empty * (current state for all 7 widgets), shows a placeholder message. * As widgets gain configSchema definitions, this dialog will render * appropriate form controls. */ import { useState } from "react"; import type { ReactElement } from "react"; import { getWidgetByName } from "./WidgetRegistry"; export interface WidgetConfigDialogProps { widgetId: string; open: boolean; onClose: () => void; } export function WidgetConfigDialog({ widgetId, open, onClose, }: WidgetConfigDialogProps): ReactElement | null { const [hoverClose, setHoverClose] = useState(false); if (!open) return null; // Extract widget type from ID (format: "WidgetType-suffix") const widgetType = widgetId.split("-")[0] ?? ""; const widgetDef = getWidgetByName(widgetType); return ( <> {/* Backdrop */}
{/* Dialog */}{widgetDef.description}
)}No configuration options available for this widget yet.
Widget configuration will be added in a future update.