@extends('layouts.app')
@section('content')
<h5 class="fw-bold mb-3 text-danger"><i class="fa-solid fa-tower-broadcast me-2 animate-ping"></i>Active Emergency Dispatches</h5>
<div class="d-flex flex-column gap-3">
    @forelse($emergencySignals as $sig)
    <div class="card border-0 border-start border-4 border-danger shadow-sm bg-white">
        <div class="card-body">
            <h6 class="fw-bold mb-1">Distress Signal From: {{ $sig->user->name }}</h6>
            <p class="text-muted small mb-2"><i class="fa-solid fa-location-dot me-1 text-danger"></i> Coordinates: {{ $sig->latitude }}, {{ $sig->longitude }}</p>
            <a href="https://google.com{{ $sig->latitude }},{{ $sig->longitude }}" target="_blank" class="btn btn-sm btn-outline-primary fw-bold w-100">Launch Intercept Route Map</a>
        </div>
    </div>
    @empty
    <div class="text-center py-5 bg-white rounded shadow-sm"><i class="fa-solid fa-circle-check text-success fa-2x mb-2"></i><p class="text-muted small mb-0">All clear. No active alerts reported.</p></div>
    @endforelse
</div>
@endsection
