import { ChangeDetectionStrategy, Component, input } from '@angular/core'; import { BodyReadouts } from './body-readouts'; /** * The Measured/Derived rows and the provenance footnote, shared by the detail page's info panel * and the system view's object card. `bodyReadouts` already guarantees the two surfaces agree * on the numbers; this guarantees they agree on the pixels — the markup used to be pasted four * times across the two templates, which is exactly the drift the shared data model exists to * prevent. */ @Component({ selector: 'app-readout-sections', changeDetection: ChangeDetectionStrategy.OnPush, template: ` @if (readouts().measured.length) {

Measured

@for (row of readouts().measured; track row.label) {
{{ row.label }}
{{ row.value }}
}
}

Derived

@for (row of readouts().derived; track row.label) {
{{ row.label }}
{{ row.value }}
}

{{ readouts().provenance }}

` }) export class ReadoutSectionsComponent { readonly readouts = input.required(); }