@extends('layouts.app')
@section('title','Integration Log Detail - NGBVD')

@section('content')
@include('integrations.partials.settings_style')
@php
    $status=strtolower($log->status ?? 'pending');
    $badge=$status==='success'?'ni-success':(in_array($status,['failed','error'])?'ni-danger':($status==='retrying'?'ni-warning':'ni-muted'));
    $client = $log->apiClient ?? null;
@endphp
<div class="ni-shell">
    <div class="ni-hero">
        <div>
            <span class="ni-kicker">Zero Trust API Audit Trail</span>
            <h2 class="ni-title">Sharing Log Detail</h2>
            <p class="ni-subtitle">{{ $client->name ?? $log->system_name ?? $log->integration_name ?? 'External System' }} / {{ ucfirst($status) }}</p>
        </div>
        <div class="ni-actions"><a href="{{ url('/integrations/logs') }}" class="btn ngbvd-btn-soft"><i class="ti-arrow-left"></i> Back to Logs</a></div>
    </div>
    <div class="ni-card">
        <div class="ni-card-body">
            <div class="mb-3"><strong>UUID:</strong> <code>{{ $log->uuid }}</code></div>
            @include('integrations.partials.log_detail_grid', ['log' => $log, 'client' => $client, 'badge' => $badge, 'status' => $status])
        </div>
    </div>
</div>
@endsection
