{{ __('GCU Governance Voting') }}

@php // Get active polls (in production, this would be fetched from the database) $activePolls = \App\Domain\Governance\Models\Poll::where('status', 'active') ->where('start_date', '<=', now()) ->where('end_date', '>=', now()) ->get(); $upcomingPolls = \App\Domain\Governance\Models\Poll::where('status', 'draft') ->orWhere('start_date', '>', now()) ->orderBy('start_date') ->limit(3) ->get(); @endphp
{{ __('Your Voting Power') }}
@if(auth()->user()->accounts->count() > 0) {{ number_format(auth()->user()->accounts->sum(fn($a) => $a->getBalance('GCU')) / 100, 2) }} GCU @else 0.00 GCU @endif
{{ __('Active Polls') }}
{{ $activePolls->count() }}
{{ __('Next Rebalancing') }}
{{ now()->startOfMonth()->addMonth()->format('F j, Y') }}

{{ __('Active Polls') }}

@if($activePolls->count() > 0)
@foreach($activePolls as $poll)

{{ $poll->title }}

{{ $poll->description }}

{{ __('Ends') }} {{ $poll->end_date->diffForHumans() }}
@if($poll->metadata && isset($poll->metadata['type']) && $poll->metadata['type'] === 'basket_composition')

{{ __('Current Basket Composition:') }}

USD: 35%
EUR: 30%
GBP: 20%
CHF: 10%
JPY: 3%
XAU: 2%
@endif
@endforeach
@else

{{ __('No active polls at the moment.') }}

@endif

{{ __('Upcoming Polls') }}

@if($upcomingPolls->count() > 0)
@foreach($upcomingPolls as $poll)

{{ $poll->title }}

{{ __('Starts') }} {{ $poll->start_date->format('F j, Y') }}

{{ $poll->start_date->diffForHumans() }}
@endforeach
@else

{{ __('No upcoming polls scheduled.') }}

@endif