@if (selectedExecutionId()) {

{{ 'PAC.Xpert.StateInspector' | translate: { Default: 'State Inspector' } }}

@if (execution(); as execution) { {{ execution.status }} }
@if (canRerun()) { }
@if (!collapsed()) {
@if (loadingCheckpoints() || loadingExecution()) {
{{ 'PAC.Xpert.LoadingCheckpoints' | translate: { Default: 'Loading checkpoints…' } }}
} @else if (checkpoints().length) { @for (checkpoint of checkpoints(); track checkpoint.checkpointId; let index = $index) { } } @else {
{{ execution()?.status === eExecutionStatusEnum.RUNNING ? ('PAC.Xpert.StatePending' | translate: { Default: 'State snapshots will appear after the next persisted checkpoint.' }) : ('PAC.Xpert.NoCheckpoints' | translate: { Default: 'No checkpoint lineage is available for this execution yet.' }) }}
}
@if (loadingSchema() && !hasCategories()) {
{{ 'PAC.Xpert.LoadingVariables' | translate: { Default: 'Loading variables…' } }}
} @else if (hasCategories()) {
@for (category of categories(); track category.id) { @if (category.groups.length) {
{{ 'PAC.Xpert.StateCategory.' + category.id | translate: { Default: category.label } }}
@for (group of category.groups; track group.id) {
{{ group.label }}
@for (variable of group.variables; track variable.path) { @if (shouldShowVariable(group, variable)) { } }
}
} }
} @else {
{{ 'PAC.Xpert.NoStateVariables' | translate: { Default: 'No state variables are available for this checkpoint.' } }}
}
@if (currentSnapshotEntry()?.status === 'loading') {
{{ 'PAC.Xpert.LoadingSnapshot' | translate: { Default: 'Loading checkpoint state…' } }}
} @else if (currentSnapshotEntry()?.status === 'error') {
{{ 'PAC.Xpert.StateLoadFailed' | translate: { Default: 'Failed to load checkpoint state' } }}
{{ currentSnapshotEntry()?.error }}
} @else if (selectedVariable(); as selected) {
{{ 'PAC.Xpert.StateVariable' | translate: { Default: 'State variable' } }}
{{ selected.variable.path }}
@if (selectedValueCanPreviewMarkdown()) {
}
@if (selectedValueIsString()) { @if (stringViewMode() === 'preview' && selectedValueCanPreviewMarkdown()) { } @else {
{{
                          selectedValue()
                        }}
} } @else if (selectedValueIsObject() || selectedValueIsArray()) { } @else {
{{
                        selectedValue() | json
                      }}
}
} @else {
{{ 'PAC.Xpert.SelectStateVariable' | translate: { Default: 'Select a state variable to inspect its value.' } }}
}
}
}