import { Button, Input, Select, Tabs, Textarea } from '@rozenite/ui'; import { RotateCcw, Send } from 'lucide-react'; import { useState, type FormEvent } from 'react'; import type { DevHostFlowEntry, DevHostFlowRunState, DevHostPresetEntry, } from '../types.js'; import { FlowList } from './FlowList.js'; type DispatchFormProps = { commandType: string; commandPayload: string; flows: DevHostFlowEntry[]; flowRuns: DevHostFlowRunState[]; hasRunningFlow: (flowName: string) => boolean; presets: DevHostPresetEntry[]; canDispatch: boolean; onRunFlow: (flow: DevHostFlowEntry) => void; onStopFlow: (runId: string) => void; onCommandTypeChange: (value: string) => void; onCommandPayloadChange: (value: string) => void; onApplyPreset: (preset: DevHostPresetEntry) => void; onReset: () => void; onSubmit: (event: FormEvent) => void; }; export const DispatchForm = ({ commandType, commandPayload, flows, flowRuns, hasRunningFlow, presets, canDispatch, onRunFlow, onStopFlow, onCommandTypeChange, onCommandPayloadChange, onApplyPreset, onReset, onSubmit, }: DispatchFormProps) => { const [activeTab, setActiveTab] = useState<'dispatch' | 'flows'>('dispatch'); return (

Actions

setActiveTab(value as 'dispatch' | 'flows')} >
Dispatch Flows {activeTab === 'dispatch' ? ( ) : null}