{{-- Courier booking buttons — API + manual tiles --}} @php $orderId = $orderId ?? null; $btnClass = $btnClass ?? 'booking-btn-single'; $manualNamedClass = $manualNamedClass ?? 'booking-btn-manual-named'; $steadfastOn = $steadfastOn ?? false; $pathaoOn = $pathaoOn ?? false; $redxOn = $redxOn ?? false; $carrybeeOn = $carrybeeOn ?? false; $manualOn = $manualOn ?? false; $manualCouriers = $manualCouriers ?? collect(); $couriers = $couriers ?? collect(); $apiTiles = [ 'steadfast' => $steadfastOn, 'pathao' => $pathaoOn, 'redx' => $redxOn, 'carrybee' => $carrybeeOn, ]; $apiCount = collect($apiTiles)->filter()->count(); $manualCount = $manualOn ? $manualCouriers->count() : 0; $totalBtns = $apiCount + $manualCount; $gridCols = max(min($totalBtns, 4), 1); @endphp