import React, { useState } from 'react'; import { Tool } from '../types'; import ChatView from './ChatView'; import ImageView from './ImageView'; import VideoView from './VideoView'; import LiveView from './LiveView'; import MoltBotView from './MoltBotView'; interface ToolExecutionViewProps { tool: Tool; onRun: () => boolean; } const ToolExecutionView: React.FC = ({ tool, onRun }) => { const [hasPaid, setHasPaid] = useState(false); const handleStart = () => { if (onRun()) { setHasPaid(true); } }; if (!hasPaid) { return (

Execute {tool.name}

This tool requires 10 Credits per execution. The creator will earn ${tool.epc} from this run.

Verified Asset by {tool.author}

); } return (
{tool.category === 'Text' && } {tool.category === 'Image' && } {tool.category === 'Video' && } {tool.category === 'Voice' && } {tool.category === 'Agent' && }
); }; export default ToolExecutionView;