@extends('layouts.user') @section('title', $port->port_name . ' β€” Port Details') @push('styles') @endpush @section('content') {{-- Flower Decorations --}}
Decorative Flower
Decorative Flower
{{-- Back Button --}} ← Back to Port Dashboard {{-- Port Header --}}
βš“

{{ $port->port_name }}

@if($port->country?->flag_url) {{ $port->country->name }} @endif {{ $port->country->name ?? 'Unknown Country' }}
{{ $port->status ?? 'Open' }}
@if($port->congestion_level >= 70) πŸ”΄ High Risk @elseif($port->congestion_level >= 30) 🟑 Medium Risk @else 🟒 Low Risk @endif
{{-- Detail Grid --}}
{{-- Port Information --}}

πŸ“‹ Port Information

UNLOCODE {{ $port->port_code ?? 'N/A' }}
City {{ $port->city ?: 'N/A' }}
Latitude {{ $port->latitude ? number_format($port->latitude, 6) : 'N/A' }}
Longitude {{ $port->longitude ? number_format($port->longitude, 6) : 'N/A' }}
Port Size @if($port->capacity >= 50000) Large Port @elseif($port->capacity >= 10000) Medium Port @else Small Port @endif
Capacity {{ $port->capacity ? number_format($port->capacity) . ' TEU' : 'N/A' }}
Congestion Level {{ $port->congestion_level ?? 0 }}%
Last Updated {{ $port->updated_at ? $port->updated_at->format('M d, Y') : 'N/A' }}
{{-- Weather Information --}}

🌀️ Current Weather

{{ $weather['temperature'] }}
Temperature
{{ $weather['condition'] }}
Condition
{{ $weather['humidity'] }}
Humidity
{{ $weather['wind_speed'] }}
Wind Speed
{{-- Country Information --}}

🌍 Country Details

Country {{ $port->country->name ?? 'Unknown' }}
ISO Code {{ $port->country->iso2 ?? 'N/A' }}
Region {{ $port->country->region ?? 'N/A' }}
Capital {{ $port->country->capital ?? 'N/A' }}
Population {{ $port->country->population ? number_format($port->country->population) : 'N/A' }}
GDP (USD) {{ $port->country->gdp ? '$' . number_format($port->country->gdp / 1000000000, 1) . 'B' : 'N/A' }}
{{-- Risk Assessment --}}

⚠️ Risk Assessment

Overall Risk @if($port->congestion_level >= 70) πŸ”΄ High @elseif($port->congestion_level >= 30) 🟑 Medium @else 🟒 Low @endif
Congestion Risk {{ $port->congestion_level ?? 0 }}%
Operational Status {{ $port->status ?? 'Open' }}
Reliability @if($port->congestion_level < 30) Very High @elseif($port->congestion_level < 50) High @elseif($port->congestion_level < 70) Moderate @else Low @endif
{{-- Map Section --}} @if($port->latitude && $port->longitude)

πŸ—ΊοΈ Location Map

@endif {{-- Nearby Ports --}} @if($nearbyPorts->count() > 0)

πŸ“ Nearby Ports (within 100km)

@foreach($nearbyPorts as $nearby)
βš“
{{ $nearby->port_name }}

@if($nearby->country?->flag_url) @endif {{ $nearby->country->name ?? 'Unknown' }}

{{ $nearby->status ?? 'Open' }}
@endforeach
@endif {{-- Action Buttons --}}
← Back to Ports @if($port->latitude && $port->longitude) @endif
@endsection @push('scripts') @endpush