import React from 'react'; import { Box, Text } from 'ink'; import { colors } from '../../../theme.js'; import type { VariableInput, DataResult } from '../types.js'; interface DataResultStepProps { actionName: string; variables: VariableInput[]; dataResults: DataResult[]; } /** * Displays the result of a data-only action (e.g. sign, verify). * * NOTE: Engine-level data action execution is not yet implemented. * The computed values are stubbed until the engine supports evaluating * CashASM data expressions outside of a transaction context. */ export function DataResultStep({ actionName, variables, dataResults, }: DataResultStepProps): React.ReactElement { return ( {actionName} — Result {/* Variables that were provided */} {variables.length > 0 && ( Provided values: {variables.map((v) => ( {' '}{v.name}: {v.value || '(empty)'} ))} )} {/* Computed data results */} Output: {dataResults.length === 0 ? ( {' '}Engine support for data actions is not yet implemented. ) : ( dataResults.map((result) => ( {' '}{result.name} ({result.type}): {result.value !== null ? ( {result.value} ) : ( {' '}Pending — engine data execution not yet available )} )) )} Press Done to exit. ); }