@extends('layouts.user') @section('title', $currency->name . ' (' . $currency->code . ') - Currency Details') @push('styles') @endpush @push('scripts') @endpush @section('content') {{-- Flower Decorations --}}
Decorative Flower
Decorative Flower
{{-- Breadcrumb --}} {{-- Currency Header --}}

{{ $currency->name }}

{{ $currency->code }} • {{ $currency->symbol ?? $currency->code }}

@if($latestRate)
{{ $currency->symbol ?? $currency->code }}{{ number_format($latestRate->exchange_rate, 4) }} vs {{ $baseCur->code }} @if($latestRate->change_percentage) @php $changeClass = $latestRate->change_percentage > 0 ? 'bg-green-500' : ($latestRate->change_percentage < 0 ? 'bg-red-500' : 'bg-gray-500'); $changeIcon = $latestRate->change_percentage > 0 ? '↗' : ($latestRate->change_percentage < 0 ? '↘' : '→'); @endphp {{ $changeIcon }} {{ number_format(abs($latestRate->change_percentage), 2) }}% @endif
@endif
@if($latestRate)

Last Updated

{{ $currency->updated_at ? $currency->updated_at->format('M d, Y H:i') : $latestRate->recorded_at->format('M d, Y H:i') }}

{{ $currency->updated_at ? $currency->updated_at->diffForHumans() : $latestRate->recorded_at->diffForHumans() }}

@endif
{{-- Statistics Cards --}}
{{ number_format($highestRate, 4) }}
Highest ({{ $period }}D)
{{ number_format($lowestRate, 4) }}
Lowest ({{ $period }}D)
{{ number_format($avgRate, 4) }}
Average
{{ number_format($volatility, 2) }}%
Volatility
{{ $historicalRates->count() }}
Data Points
{{-- Historical Chart --}}

Historical Exchange Rate

{{-- Correlations --}}

Currency Correlations

vs Major Currencies ({{ $period }} days)

@forelse($correlations as $correlation) @php $corrValue = $correlation['correlation']; $corrClass = $corrValue > 0.3 ? 'correlation-positive' : ($corrValue < -0.3 ? 'correlation-negative' : 'correlation-neutral'); $corrWidth = abs($corrValue) * 100; @endphp
{{ $correlation['currency']->code }} {{ $correlation['currency']->name }}
{{ $corrValue >= 0 ? '+' : '' }}{{ $corrValue }}
@empty

No correlation data available

@endforelse
{{-- Countries Using This Currency --}} @if($countries->isNotEmpty())

Countries Using {{ $currency->code }}

{{ $countries->count() }} {{ $countries->count() === 1 ? 'country' : 'countries' }}

@foreach($countries as $country)
@if($country->flag_url) {{ $country->name }} flag @endif

{{ $country->name }}

{{ $country->iso2 }}

@endforeach
@endif {{-- Quick Actions --}}
📊 Compare with {{ $baseCur->code }} 🔄 Use as Base Currency ⬅️ Back to Dashboard
@endsection @push('scripts') @endpush