@extends('layouts.admin') @section('title', __('admin.ingestion.review_title')) @section('content')
{{ __('admin.labels.status') }}{{ __('admin.ingestion.status.'.$candidate->status) }}
{{ __('admin.ingestion.entity') }}{{ __('admin.ingestion.entity_type.'.$candidate->entity_type) }}
{{ __('admin.ingestion.external_id') }}{{ $candidate->external_id ?: '—' }}
{{ __('admin.ingestion.suggestion_score') }}{{ $candidate->match_score !== null ? $candidate->match_score.'%' : '—' }}
@if($candidate->entity_type !== 'park')

{{ __('admin.ingestion.parent_context') }}

{{ __('admin.ingestion.parent_context_help') }}

@if($parentDescription) {{ $parentDescription['name'] }} @else {{ __('admin.ingestion.parent_unresolved') }} @endif
@if($candidate->parent_external_id) {{ __('admin.ingestion.parent_external_id') }}: {{ $candidate->parent_external_id }} @endif
@endif @if(data_get($candidate->normalized_payload, 'automation.analyzed_at'))

{{ __('admin.ingestion_automation.evidence_title') }}

{{ __('admin.ingestion_automation.evidence_help') }}

@if(data_get($candidate->normalized_payload, 'automation.safe_to_create')) {{ __('admin.ingestion_automation.safe_badge') }} @endif
{{ __('admin.ingestion_automation.classification') }}{{ data_get($candidate->normalized_payload, 'automation.classification.entity_type') === 'coaster' ? __('admin.ingestion.entity_type.coaster') : __('admin.ingestion.entity_type.'.$candidate->entity_type) }}
{{ __('admin.ingestion_automation.classification_score') }}{{ data_get($candidate->normalized_payload, 'automation.classification.score') ? data_get($candidate->normalized_payload, 'automation.classification.score').'%' : '—' }}
{{ __('admin.ingestion_automation.automation_status') }}{{ $candidate->isResolved() ? __('admin.ingestion_automation.processed') : (data_get($candidate->normalized_payload, 'automation.safe_to_create') ? __('admin.ingestion_automation.safe') : __('admin.ingestion_automation.manual')) }}
{{ __('admin.ingestion_automation.reason') }}{{ __('admin.ingestion_automation.reason_codes.'.data_get($candidate->normalized_payload, 'automation.safe_reason', 'manual_review_required')) }}
@endif @if($candidate->isResolved())
{{ __('admin.ingestion.already_resolved') }} @if($resolved) {{ $resolved['name'] }} @endif
@else @if($suggested)

{{ __('admin.ingestion.suggested_match') }}

{{ __('admin.ingestion.suggested_match_help') }}

{{ $candidate->match_score }}%
{{ $suggested['name'] }}{{ $suggested['meta'] }}
@csrf
@endif

{{ __('admin.ingestion.associate_existing') }}

{{ __('admin.ingestion.associate_help') }}

@if($targets->isEmpty())
{{ __('admin.ingestion.no_targets') }}
@else
@foreach($targets as $target)
@csrf
{{ $target['name'] }}{{ $target['meta'] }}
@endforeach
@endif

{{ __('admin.ingestion.other_actions') }}

{{ __('admin.ingestion.other_actions_help') }}

@if($creationBlocked)
{{ __('admin.ingestion.parent_must_be_resolved') }}
@endif
@csrf

@csrf
@endif

{{ __('admin.ingestion.observations') }}

{{ __('admin.ingestion.observations_help') }}

@forelse($candidate->values as $candidateValue) @php try { $decodedValue = $candidateValue->normalizedValue(); $displayValue = is_scalar($decodedValue) || $decodedValue === null ? var_export($decodedValue, true) : json_encode($decodedValue, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); } catch (Throwable $e) { $displayValue = '—'; } @endphp @empty @endforelse
{{ __('admin.ingestion.field') }} {{ __('admin.ingestion.observation_target') }} {{ __('admin.ingestion.value') }} {{ __('admin.ingestion.confidence') }} {{ __('admin.labels.status') }}
{{ $candidateValue->field_key }}@if($candidateValue->locale){{ strtoupper($candidateValue->locale) }}@endif {{ __('admin.ingestion.entity_type.'.($candidateValue->subject_type ?: $candidate->entity_type)) }} {{ $displayValue }} {{ $candidateValue->confidence_score }}% {{ __('admin.ingestion.value_status.'.$candidateValue->status) }} @if($candidateValue->error_message){{ $candidateValue->error_message }}@endif
{{ __('admin.ingestion.no_observations') }}

{{ __('admin.ingestion.payload') }}

{{ __('admin.ingestion.payload_help') }}

{{ __('admin.ingestion.normalized_payload') }}

{{ json_encode($candidate->normalized_payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) }}

{{ __('admin.ingestion.raw_payload') }}

{{ json_encode($candidate->raw_payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) }}
@endsection