<div>
    <?php
        $lab_tests_request_attachment = $order->getDetailJsonValue('lab_tests_request_attachment');
        $user = $order->user;
        $userDetailJson = $user->detailJson();
    ?>
    @if(!$lab_tests_request_attachment)
        @include("app.my-account.admin.orders.forms.upload-lab-tests-request-attachment")
    @else
    <div class="d-flex align-items-center">
        <span class="me-1">Lab Request PDF: <i class="fas fa-paperclip fa-fw"></i> <a href="{{ $lab_tests_request_attachment['attachmentAccessTokenUrl'] .'?fileType=lab_tests_request_attachment' }}" target="_blank">{{ $lab_tests_request_attachment['orginalFileName'] }}</a></span>
        <div>
            @include("app.my-account.admin.orders.forms.upload-lab-tests-request-attachment", ['edit' => true])
        </div>
        <span class="text-muted mx-1">|</span>
        <div>
            @include('app.my-account.admin.orders.forms.email-attachment', [
                'title' => 'Email Lab Requisition Form for Order #' . $order->iid,
                'toEmail' => $order->user->getEmail(),
                'toName' => $order->user->displayName(),
                'subject' => 'Lab Requisition Form for Order #' . $order->iid,
                'attachmentUrl' => $lab_tests_request_attachment['attachmentAccessTokenUrl'] . '?fileType=lab_tests_request_attachment',
                'attachmentName' => $lab_tests_request_attachment['orginalFileName'],
                'attachmentPath' => $lab_tests_request_attachment['path']
            ])
        </div>
    </div>
    @endif
</div>
