@extends('layouts.dashboard') @section('title', 'Currency Dashboard — Risk Intelligence') @section('content') {{-- CURRENCY COMPARISON SELECTOR --}}

Currency Comparison

@if($comparison) {{-- EXCHANGE RATE CARDS --}}
{{-- Country A Card --}}

{{ $comparison['country_a']['name'] }}

{{ $comparison['country_a']['currency_name'] }}

Currency Code
{{ $comparison['country_a']['currency_code'] }}
{{-- Exchange Rate Card - HIGHLIGHT CARD --}}
Exchange Rate
1 {{ $comparison['country_a']['currency_code'] }} = {{ number_format($comparison['cross_rate'], 4) }} {{ $comparison['country_b']['currency_code'] }}
1 {{ $comparison['country_b']['currency_code'] }} = {{ number_format($comparison['inverse_cross_rate'], 6) }} {{ $comparison['country_a']['currency_code'] }}
{{-- Country B Card --}}

{{ $comparison['country_b']['name'] }}

{{ $comparison['country_b']['currency_name'] }}

Currency Code
{{ $comparison['country_b']['currency_code'] }}
{{-- EXCHANGE RATE ANALYTICS --}}

Exchange Rate Analytics

{{-- CURRENCY STATISTICS --}}
@if($chartData && isset($chartData['stats']))
Current Rate
{{ number_format($chartData['stats']['current'], 4) }}
Highest Rate
{{ number_format($chartData['stats']['high'], 4) }}
Lowest Rate
{{ number_format($chartData['stats']['low'], 4) }}
Average Rate
{{ number_format($chartData['stats']['average'], 4) }}
Daily Change
{{ $chartData['stats']['daily_change'] >= 0 ? '+' : '' }}{{ number_format($chartData['stats']['daily_change'], 2) }}%
Weekly Change
{{ $chartData['stats']['weekly_change'] >= 0 ? '+' : '' }}{{ number_format($chartData['stats']['weekly_change'], 2) }}%
Monthly Change
{{ $chartData['stats']['monthly_change'] >= 0 ? '+' : '' }}{{ number_format($chartData['stats']['monthly_change'], 2) }}%
@endif
{{-- CURRENCY INSIGHT --}}

Currency Insight

@if($chartData && isset($chartData['stats']))
@php $monthlyChange = $chartData['stats']['monthly_change']; $trend = $monthlyChange >= 0 ? 'strengthening' : 'weakening'; $color = $monthlyChange >= 0 ? 'var(--risk-low)' : 'var(--risk-critical)'; @endphp
{{ $comparison['country_a']['currency_code'] }} is currently {{ $trend }} against {{ $comparison['country_b']['currency_code'] }}.
Over the past 30 days, {{ $comparison['country_a']['currency_code'] }} has {{ $monthlyChange >= 0 ? 'appreciated' : 'depreciated' }} by {{ abs($monthlyChange) }}%.
The exchange rate is currently {{ $chartData['stats']['current'] > $chartData['stats']['average'] ? 'above' : 'below' }} the 30-day average of {{ number_format($chartData['stats']['average'], 4) }}.
@if(abs($monthlyChange) > 5)
High Volatility Alert: The currency has experienced significant fluctuation ({{ abs($monthlyChange) }}%) in the past month.
@endif
@endif
@else {{-- NO SELECTION STATE --}}

Select Countries to Compare

Choose two countries from the dropdowns above to analyze their currency exchange rates.

@endif @endsection @push('scripts') @endpush