import type { FlowStep } from '../../data/types'; import { Icon } from '../shared/Icon'; interface RequestPayloadPreviewProps { step: FlowStep; } export function RequestPayloadPreview({ step }: RequestPayloadPreviewProps) { const payload = { step_id: step.id, actor: step.actor, status: step.status, booking_status: step.bookingStatus, trigger: step.trigger, active_components: step.activeComponents, messages: step.messages.map((m) => ({ from: m.from, to: m.to, type: m.type, label: m.label, })), ...(Object.keys(step.sideEffects).length > 0 && { side_effects: step.sideEffects, }), }; const jsonStr = JSON.stringify(payload, null, 2); return (

Request Payload

          {jsonStr}
        
); }