<div class="row mb-3">
    <div class="col-6">
        <h3>
            @if ($invoice['customer']['company'])
                {{ $invoice['customer']['company'] }}<br />
            @endif
            {{ $invoice['customer']['last_name'] }} {{ $invoice['customer']['first_name'] }}
        </h3>
        <div class="row">
            <div class="col-6">
                <x-card title="Adresse de facturation">
                    @if ($invoice['address'])
                        {{ $invoice['address']['address'] }}<br />
                        @isset($invoice['address']['address2'])
                            {{ $invoice['address']['address2'] }}<br />
                        @endisset
                        {{ $invoice['address']['zipcode'] }}
                        {{ $invoice['address']['city'] }}<br />
                    @endif
                </x-card>
            </div>
            <div class="col-6">
                <x-card title="Adresse de livraison">
                    @if ($invoice['order']['delivery_address'])
                        {{ $invoice['order']['delivery_address']['address'] }}<br />
                        @isset($invoice['order']['delivery_address']['address2'])
                            {{ $invoice['order']['delivery_address']['address2'] }}<br />
                        @endisset
                        {{ $invoice['order']['delivery_address']['zipcode'] }}
                        {{ $invoice['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;">
                Facture N° {{ $invoice['ref'] }}<br />
                du {{ Carbon\Carbon::parse($invoice['created_at'])->isoFormat('LLLL') }}
            </div>
            <div class="col-6">
                Statut : {{ $invoice['status'] }}
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                Canal de vente : {{ $invoice['order']['sale_channel']['name'] }}
            </div>
            <div class="col-6">
                Règlement : {{ $invoice['payment_type'] }}
            </div>
        </div>
    </div>
</div>

@include('Admin.Shop.Orders.partials.detail', [
    'detail_type' => 'facture',
    'order' => $invoice['order'],
])
