// Copyright 2017-2026 @pezkuwi/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { CallResult } from './types.js'; import React from 'react'; import { Button, IdentityIcon, Output, styled } from '@pezkuwi/react-components'; import valueToText from '@pezkuwi/react-params/valueToText'; import MessageSignature from '../shared/MessageSignature.js'; interface Props { className?: string; onClear?: () => void; outcome: CallResult; } function Outcome ({ className = '', onClear, outcome: { from, message, output, params, result, when } }: Props): React.ReactElement | null { return ( } labelExtra={ {when.toLocaleDateString()} {' '} {when.toLocaleTimeString()} } value={valueToText('Text', result.isOk ? output : result)} />