@extends('theme::layouts.app', ['title' => $title ?? __('account.title|My Downloads')]) @section('content')
{{-- Account Navigation Sidebar --}} @include('theme::partials.account.nav') {{-- Main Content --}}
@if(isset($pageHeader))

{{ $pageHeader['title'] }}

{{ $pageHeader['subtitle'] }}

@endif
@forelse($entries as $entry) {{-- ═══════════════════════════════════════════════════ BUNDLE GROUP ════════════════════════════════════════════════════ --}} @if($entry['type'] === 'bundle') @php $bundleProduct = $entry['product']; $bundleOrder = $entry['order']; $bundleQuota = $quotas[$bundleOrder->id] ?? null; @endphp
{{-- Bundle header --}}
{{ $bundleProduct->name }}
{{ $bundleProduct->name }} layers {{ __('account.Bundle') }} @if($bundleProduct->category) {{ $bundleProduct->category->name }} @endif
{{-- Order or Subscription reference --}} @if($bundleOrder->subscription)
{{ __('account.Subscription') }} #{{ $bundleOrder->subscription->reference_id }}
@if($bundleOrder->subscription->next_billing_date)
{{ __('account.Next Billing') }} {{ $bundleOrder->subscription->next_billing_date->format('M d, Y') }}
@endif @else
{{ __('account.Order') }} #{{ $bundleOrder->order_reference }}
@endif {{-- Quota indicator for the bundle --}} @if($bundleQuota !== null)
download_for_offline @if($bundleQuota === 0) {{ __('account.Daily limit reached. Resets at midnight.') }} @else {{ $bundleQuota }} {{ __('account.downloads remaining today') }} @endif
@endif
{{ $entry['children']->count() }} {{ __('account.included products') }}
{{-- Bundle children --}}
@foreach($entry['children'] as $download)
{{-- Child product image --}}
{{ $download->product->name }}
{{-- Child product info --}}
{{ $download->product->name }} @if($download->product->category) {{ $download->product->category->name }} @endif @if($download->hasPolicy && $download->status === 'expired') {{ __('account.Support Expired') }} @endif
@if($download->accessVersion?->version) {{ __('account.Version') }} {{ $download->accessVersion->version }} @endif
{{-- Child actions --}}
@if($download->status === 'expired' && $download->hasNewerVersion()) {{ __('account.Older versions') }} arrow_forward @elseif($download->isAccessible()) @php $files = $download->getFiles(); @endphp @if($files->count() > 1)
@else download {{ __('account.Download') }} @endif @else @endif
@endforeach
{{-- ═══════════════════════════════════════════════════ STANDALONE ITEM ════════════════════════════════════════════════════ --}} @else @php $download = $entry['item']; @endphp
{{-- Product Image --}}
{{ $download->product->name }}
{{-- Product Info --}}
{{ $download->product->name }} @if($download->product->category) {{ $download->product->category->name }} @endif @if($download->hasPolicy && $download->status === 'expired') {{ __('account.Support Expired') }} @elseif($download->isSubscription) @if($download->isActiveSubscription()) {{ __('account.Active Subscription') }} @elseif($download->status == getConstant('SUBSCRIPTION_STATUS_CANCELLED')) {{ getConstantLabel('subscription_status', $download->status) }} @elseif($download->status == getConstant('SUBSCRIPTION_STATUS_EXPIRED')) {{ getConstantLabel('subscription_status', $download->status) }} @endif @endif
@php $quota = $quotas[$download->order->id] ?? null; @endphp @if($quota !== null)
download_for_offline @if($quota === 0) {{ __('account.Daily download limit reached. Resets at midnight.') }} @else {{ $quota }} {{ __('account.downloads remaining today') }} @endif
@endif
@if($download->isSubscription && $download->order->subscription) @else @endif @if($download->isSubscription) @if($download->order->subscription && $download->order->subscription->next_billing_date && $download->isActiveSubscription())
{{ __('account.Next Billing') }} {{ $download->order->subscription->next_billing_date->format('F d, Y') }}
@endif @else @if($download->supportExpiryDate)
{{ __('account.Support Until') }} {{ $download->supportExpiryDate->format('F d, Y') }}
@endif @if($download->accessVersion?->version)
{{ __('account.Version') }} {{ $download->accessVersion->version }}
@endif @endif
{{-- Actions --}}
@if($download->status === 'expired' && $download->hasNewerVersion())
@else
@if($download->licenseKey) @php $license = Auth::user()->licenses()->where('license_key', $download->licenseKey)->first(); @endphp @if($license) settings {{ __('account.Manage') }} @endif @endif @if($download->isAccessible()) @php $files = $download->getFiles(); @endphp @if($files->count() > 1)
@else download @if($download->isSubscription) {{ __('account.Download') }} @else @if($download->latestVersion?->version) {{ __('account.Download') }} {{ $download->latestVersion->version }} @else {{ __('account.Download') }} @endif @endif @endif @else @endif
@endif
@endif @empty
download

{{ __('account.No downloads yet') }}

{{ __('account.When you purchase products, they will appear here.') }}

shopping_cart {{ __('account.Browse Products') }}
@endforelse
@endsection