import { FileWithUrl } from "../../types/file"; import { useToolManagement } from "../../hooks/useToolManagement"; interface ToolRendererProps { selectedToolKey: string; pdfFile: any; files: FileWithUrl[]; toolParams: any; updateParams: (params: any) => void; toolSelectedFiles?: File[]; onPreviewFile?: (file: File | null) => void; } const ToolRenderer = ({ selectedToolKey, files, toolParams, updateParams, toolSelectedFiles = [], onPreviewFile, }: ToolRendererProps) => { // Get the tool from registry const { toolRegistry } = useToolManagement(); const selectedTool = toolRegistry[selectedToolKey]; if (!selectedTool || !selectedTool.component) { return