<?php
$storeOrderDetailJson = $storeOrder->detailJson();
$storeOrderSelectedOptions = json_decode(@$storeOrderDetailJson->selected_options ?? '{}');
$selectedLab = @$storeOrderSelectedOptions->lab;

?>
<table border="0" cellspacing="0" cellpadding="0"
    style="background:#fff; border-collapse:collapse;border-spacing:0;margin-bottom:30px;margin-top:10px;margin-inline:auto;">
    <tbody>
        @include('app.my-account.admin.orders.sub.template.invoice-order-detail', ['order' => $storeOrder])

        <tr height="15">
            <td colspan="3"></td>
        </tr>
        <tr>
            <td>
                <table border="0" cellpadding="0" cellspacing="0"
                    style="border-collapse:collapse;border-spacing:0;color:rgb(51,51,51);background-color:rgb(250,250,250);border-radius:3px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif">
                    <tbody>
                        <tr height="66">
                            <td width="620" rowspan="3"
                                style="vertical-align:initial;padding:20px;border-style:solid;border-color:white;border-left-width:0px;border-right-width:0px;border-top-width:0px;border-bottom-width:0px">
                                <span
                                    style="color:#000;font-size:15px;padding:5px 0;text-transform:uppercase;font-weight:600;">Lab
                                    Information</span><br> <br>
                                @if ($selectedLab)
                                    <?= selected_lab_html_address($selectedLab) ?>
                                @else
                                    ---
                                @endif
                            </td>
                            <td width="595" rowspan="3"
                                style="vertical-align:initial;padding:20px;border-style:solid;border-color:white;border-left-width:0px;border-right-width:0px;border-top-width:0px;border-bottom-width:0px">
                                <span
                                    style="color:#000;font-size:15px;padding:5px 0;text-transform:uppercase;font-weight:600;">Billing
                                    Information</span><br> <br>
                                <span style="font-weight:bold;">Bill To:</span> <br>
                                {{ $storeOrder->client->displayName() }}<br>
                                <br>
                                @if ($storeOrder->paymentMethod)
                                    <span style="font-weight:bold;">Payment Method: </span> <br>
                                    <span
                                        style="margin-right:5px;text-transform:uppercase;">{{ $storeOrder->paymentMethod->brand() }}</span>
                                    {{ $storeOrder->paymentMethod->displayNameShort() }}
                                @endif
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table>
