@foreach ($deliveries as $delivery)
    <div class="row">
        <div class="col-1">
            @include('components.form.radios.icheck', [
                'name' => 'delivery_id',
                'val' => $delivery['id'],
                'value' => (int) old('delivery_id') === $delivery['id'] ? $delivery['id'] : null,
                'id' => 'delivery_' . $delivery['id'],
                'class' => 'delivery_mode' . ($delivery['at_house'] ? ' at_house' : ''),
            ])
        </div>
        <div class="col-11">
            <strong>{{ $delivery['name'] }} - Tarif appliqué {{ $delivery['sale_channel']['name'] }}</strong><br />
            {!! $delivery['sale_channel']['description'] !!}
        </div>
    </div>
@endforeach

{!! $errors->first('delivery_id', '<p class="text-danger"><strong>:message</strong></p>') !!}

Si vous voulez laisser un message à propos de votre commande, merci de bien vouloir le renseigner dans le champ
ci-contre

@include('components.form.textarea', [
    'name' => 'comment',
    'value' => old('comment') ?? '',
])

@push('js')
    <script>
        function handleDeliveries() {
            $('#delivery_mode input.delivery_mode').change(function() {
                if ($(this).hasClass('at_house')) {
                    $('#delivery_addresses').closest('.card').removeClass('d-none');
                    var deliveryTypeId = $('input[name=delivery_type_id]:checked').val()
                } else {
                    $('#delivery_addresses').closest('.card').addClass('d-none');
                }
                var deliveryId = $(this).val();
                refreshBasketTotal(deliveryId, deliveryTypeId);
            });
        }

        handleDeliveries();
    </script>
@endpush
