| 1 | #nullable enable |
| 2 | using System.Collections.ObjectModel; |
| 3 | using CascadeIDE.Models; |
| 4 | |
| 5 | namespace CascadeIDE.Cockpit.Composition.EnvironmentReadiness; |
| 6 | |
| 7 | /// <summary> |
| 8 | /// Composes Environment Readiness rows into UI-bound collection. |
| 9 | /// </summary> |
| 10 | public sealed class EnvironmentReadinessSurfaceCompositor : IEnvironmentReadinessSurfaceCompositor |
| 11 | { |
| 12 | public ObservableCollection<AnnunciatorLampItem> Compose( |
| 13 | ObservableCollection<AnnunciatorLampItem> scene, |
| 14 | IReadOnlyList<AnnunciatorLampItem> payload, |
| 15 | in EnvironmentReadinessSurfaceDecision decision) |
| 16 | { |
| 17 | if (!decision.Enabled) |
| 18 | return scene; |
| 19 | |
| 20 | scene.Clear(); |
| 21 | foreach (var row in payload) |
| 22 | scene.Add(row); |
| 23 | return scene; |
| 24 | } |
| 25 | } |
| 26 | |
View only · write via MCP/CIDE