{{-- Order confirmation modal — shown after a successful place() in any client skin. Detects order type via $lastOrder['is_subscription'] / $lastOrder['is_drip_feed']. Normal order: link, quantity Drip-feed order: link, qty_per_run, runs, interval, total_qty, duration Subscription order: username, sub_min, sub_max, sub_posts, old_posts, delay, expiry, total_max --}} @php $isSub = $lastOrder['is_subscription'] ?? false; $isDrip = $lastOrder['is_drip_feed'] ?? false; if ($isSub) { $modalTitle = __('Subscription created!'); $modalSub = __('Your subscription is active and will apply to future posts automatically.'); $btnLabel = __('View subscriptions'); $btnRoute = route('app.subscriptions'); $btnIcon = 'repeat'; $chipIcon = 'refresh-cw'; $chipColor = 'purple'; } elseif ($isDrip) { $modalTitle = __('Drip-feed started!'); $modalSub = __('Your order will be delivered gradually at the configured interval.'); $btnLabel = __('View Drip-feed'); $btnRoute = route('app.dripfeed'); $btnIcon = 'layers'; $chipIcon = 'clock'; $chipColor = 'blue'; } else { $modalTitle = __('Order received!'); $modalSub = __('Your order is in the queue and will be sent to the provider shortly.'); $btnLabel = __('View orders'); $btnRoute = route('app.orders'); $btnIcon = 'list'; $chipIcon = null; $chipColor = null; } // Interval human-readable for drip-feed $intervalLabel = ''; if ($isDrip && isset($lastOrder['interval'])) { $m = (int) $lastOrder['interval']; if ($m >= 60 && $m % 60 === 0) { $h = $m / 60; $intervalLabel = $h == 1 ? __('Every hour') : __('Every :n hours', ['n' => $h]); } else { $intervalLabel = __('Every :n minutes', ['n' => $m]); } } // Delay human-readable for subscriptions $delayLabel = ''; if ($isSub && isset($lastOrder['delay'])) { $d = (int) $lastOrder['delay']; $delayLabel = $d > 0 ? __(':n minutes', ['n' => $d]) : __('No delay'); } @endphp
{{-- Animated checkmark --}}

{{ $modalTitle }}

{{ $modalSub }}

{{ __('Order ID') }} {{ $lastOrder['id'] }}
{{-- Service (all types) --}}
{{ __('Service') }} {{ $lastOrder['service'] }}
@if ($isSub) {{-- ── SUBSCRIPTION rows ────────────────────────────── --}} @if (!empty($lastOrder['username']))
{{ __('Profile') }} {{ $lastOrder['username'] }}
@endif
{{ __('Min / post') }} {{ number_format($lastOrder['sub_min'] ?? 0) }}
{{ __('Max / post') }} {{ number_format($lastOrder['sub_max'] ?? 0) }}
@if (($lastOrder['sub_posts'] ?? 0) > 0)
{{ __('Next posts') }} {{ number_format($lastOrder['sub_posts']) }}
@endif @if (($lastOrder['old_posts'] ?? 0) > 0)
{{ __('Old posts') }} {{ number_format($lastOrder['old_posts']) }}
@endif @if ($delayLabel)
{{ __('Delay') }} {{ $delayLabel }}
@endif @if (!empty($lastOrder['expiry']))
{{ __('Expiry') }} {{ $lastOrder['expiry'] }}
@endif @if (!empty($lastOrder['total_max']))
{{ __('Max total') }} {{ $lastOrder['total_max'] }}
@endif @elseif ($isDrip) {{-- ── DRIP-FEED rows ───────────────────────────────── --}} @if (!empty($lastOrder['link']))
{{ __('Link') }} {{ $lastOrder['link'] }}
@endif
{{ __('Per run') }} {{ $lastOrder['qty_per_run'] ?? '—' }}
{{ __('Runs') }} {{ $lastOrder['runs'] ?? '—' }}
{{ __('Interval') }} {{ $intervalLabel ?: '—' }}
{{ __('Total') }} {{ $lastOrder['total_qty'] ?? '—' }}
@if (!empty($lastOrder['duration']))
{{ __('Duration') }} {{ __('~:d', ['d' => $lastOrder['duration']]) }}
@endif @else {{-- ── NORMAL ORDER rows ────────────────────────────── --}} @if (!empty($lastOrder['link']))
{{ __('Link') }} {{ $lastOrder['link'] }}
@endif
{{ __('Quantity') }} {{ $lastOrder['quantity'] ?? '—' }}
@endif {{-- Charge & Balance (all types) --}}
{{ __('Charge') }} {{ $lastOrder['charge'] }}
{{ __('Balance') }} {{ $lastOrder['balance'] }}
{{-- Chips for normal orders (refill/cancel) --}} @if (!$isSub && !$isDrip && ($lastOrder['refill'] || $lastOrder['cancel']))
@if ($lastOrder['refill']) {{ __('Refill available') }} @endif @if ($lastOrder['cancel']) {{ __('Cancel available') }} @endif
@endif {{-- Type badge for drip-feed / subscription --}} @if ($isDrip || $isSub)
{{ $isSub ? __('Subscription') : __('Drip-feed') }}
@endif
{{ $btnLabel }}