{{-- 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