import { DroppedFile } from './useFileDrop.ts'; import { THEME } from './theme.ts'; import { FileCardAdd } from './FileCardAdd.tsx'; import { ThemeToggleButton } from './ThemeToggleButton.tsx'; import { useThemeMode } from './ThemeModeContext.tsx'; export interface DescriptorRequestProps { missing: Omit; onFileProvided: (file: DroppedFile) => void; } export function DescriptorRequest({ missing, onFileProvided, }: DescriptorRequestProps) { const { isDarkMode } = useThemeMode(); const theme = THEME[isDarkMode ? 'dark' : 'light']; return (
{/* Theme toggle button in top-right corner */}
{/* Main content centered */}
{/* Title */}

Missing {missing.name}

To visualize this plan, we need the following descriptor file:

{/* Missing file info */}

{missing.name}

{missing.help && (
{missing.help}
)}
{/* File upload component */} onFileProvided({ ...missing, value })} /> {/* Additional help text */}

Drag and drop the required file above, or click to browse for it on your computer. This file contains the necessary definitions for visualizing the Substrait plan.

); }