<div class="row">
    <div class="col-6">
        <h4>{{ $order['delivery']['name'] ?? '' }} </h4>
    </div>
    <div class="col-6 text-right">
    </div>
</div>

<div class="row mb-3">
    <div class="col-6">
        <h3>
            {{ $order['customer']['last_name'] }} {{ $order['customer']['first_name'] }}
        </h3>
        <div class="row">
            <div class="col-6">
                <x-card title="Adresse de facturation">
                    @if ($order['invoice']['address'])
                        {{ $order['invoice']['address']['address'] }}<br />
                        @isset($order['invoice']['address']['address2'])
                            {{ $order['invoice']['address']['address2'] }}<br />
                        @endisset
                        {{ $order['invoice']['address']['zipcode'] }}
                        {{ $order['invoice']['address']['city'] }}<br />
                    @endif
                </x-card>
            </div>
            <div class="col-6">
                <x-card title="Adresse de livraison">
                    @if ($order['delivery_address'])
                        {{ $order['delivery_address']['address'] }}<br />
                        @isset($order['delivery_address']['address2'])
                            {{ $order['delivery_address']['address2'] }}<br />
                        @endisset
                        {{ $order['delivery_address']['zipcode'] }}
                        {{ $order['delivery_address']['city'] }}<br />
                    @endif
                </x-card>
            </div>
        </div>
    </div>
    <div class="col-6">
        <div class="row mb-3">
            <div class="col-6" style="font-size: 1.2em; font-weight: 500;">
                Commande N° {{ $order['ref'] }}<br />
                du {{ Carbon\Carbon::parse($order['created_at'])->isoFormat('LLLL') }}
            </div>
            <div class="col-6">
                Statut : {{ $order['status'] }}
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                Canal de vente : {{ $order['sale_channel']['name'] }}
            </div>
            <div class="col-6">
                Règlement : {{ $order['payment_type'] }}
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-4">
                Type de livraison : {{ $order['delivery_type_id'] }}
            </div>
            <div class="col-4">
                Référence Colis : {{ $order['delivery_ref'] }}
            </div>
            <div class="col-4">
                Lien suivi : {{ $order['delivery_link'] }}
            </div>

        </div>
    </div>
</div>

@include('Admin.Shop.Orders.partials.detail', ['detail_type' => 'commande'])
