import React, { useState } from 'react'; import { GuardianCommandType } from '../types'; interface GuardianConsoleProps { onAction: (command: GuardianCommandType, targetNode: string) => void; disabled: boolean; } const GuardianConsole: React.FC = ({ onAction, disabled }) => { const [command, setCommand] = useState(GuardianCommandType.DEPLOY_SWARM); const [targetNode, setTargetNode] = useState(''); const handleSend = () => { if (!disabled && targetNode.trim()) { onAction(command, targetNode.trim()); setTargetNode(''); } }; return (

GUARDIAN CONSOLE

setTargetNode(e.target.value)} placeholder="e.g., Node-77B" disabled={disabled} className="w-full bg-gray-900 border border-cyan-700/50 rounded-md px-3 py-2 text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500" />
); }; export default GuardianConsole;