import 'package:flutter/material.dart'; import '../../../core/api_gateway.dart'; import '../actions/decision_action.dart'; import '../actions/decision_wording.dart'; import '../domain/run_decisions.dart'; /// A recorded human checkpoint, never an audit-export/resource wait. class RunDecisionNotice extends StatelessWidget { const RunDecisionNotice({ super.key, required this.run, required this.gateway, required this.onRunChanged, }); final JsonMap run; final ApiGateway gateway; final ValueChanged onRunChanged; @override Widget build(BuildContext context) { final pending = pendingDecision(run); if (pending == null) return const SizedBox.shrink(); // One full-width line of the header strip: the glyph in the waiting // colour, the title over its meta line, and the action on the trailing // edge. The strip is already the frame, so the banner draws no card, // border or tint of its own. final color = Theme.of(context).colorScheme.tertiary; final metaStyle = Theme.of(context).textTheme.bodySmall; return Container( key: const Key('run-decision-banner'), width: double.infinity, padding: const EdgeInsets.only(top: 8, bottom: 4), child: Row( children: [ Icon(Icons.schedule, color: color, size: 18), const SizedBox(width: 12), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Semantics( header: true, child: const Text( decisionWaitingTitle, style: TextStyle(fontWeight: FontWeight.w600), ), ), const SizedBox(height: 2), Text( decisionMeta(pending), style: metaStyle, maxLines: 1, overflow: TextOverflow.ellipsis, ), ], ), ), const SizedBox(width: 12), HumanDecisionAction( run: run, gateway: gateway, onRunChanged: onRunChanged, ), ], ), ); } }