<x-admin.layout :hasExtraSettings="false">

    <div class="nk-block-head nk-block-head-sm">
        <div class="nk-block-between gy-2 gx-3">
            <div class="nk-block-head-content">
                <h3 class="nk-block-title page-title">Deposits</h3>
                <p>Total <span class="text-base total">0</span> transactions.</p>
            </div>
            <div class="nk-block-head-content">
                <div class="toggle-wrap nk-block-tools-toggle">
                    <a href="#" class="btn btn-icon btn-trigger toggle-expand mr-n1" data-target="pageMenu"><em class="icon ni ni-menu-alt-r"></em></a>
                    <div class="toggle-expand-content" data-content="pageMenu">
                        <ul class="nk-block-tools g-3">

                            <li class="nk-block-tools-opt">
                                <div class="btn-group">
                                    <button class="m-tnx-manual btn btn-primary add-tx" data-action="manual" data-action="manual" data-view="any" data-backdrop="static"><em class="icon ni ni-plus"></em> <span>Add</span></button>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <x-admin.inpage-navigation />

    <div class="nk-block">
        <div class="row g-gs">
            <div class="col-xxl-12 col-sm-12">

                <h6 class="mb-3">All Deposits</h6>
                <div class="card">
                    <div class="card-inner">
                        <div class="table-responsive scroll pb-4">
                            <table class="datatable-init nowrap nk-tb-list is-separate" data-auto-responsive="false">
                                <thead>
                                    <tr class="nk-tb-item nk-tb-head">
                                        <th class="nk-tb-col"><span>txID</span></th>
                                        <th class="nk-tb-col"><span>Amount</span></th>
                                        <th class="nk-tb-col"><span>Receiving Account</span></th>
                                        <th class="nk-tb-col"><span>Bank</span></th>
                                        <th class="nk-tb-col"><span>Description</span></th>
                                        <th class="nk-tb-col"><span>Date/Time</span></th>
                                        <th class="nk-tb-col"><span>Status</span></th>
                                        <th class="nk-tb-col nk-tb-col-tools"></th>
                                    </tr><!-- .nk-tb-item -->
                                </thead>
                                <tbody>
                                    {{-- @foreach ($deposits as $deposit)
                                        <tr class="nk-tb-item">
                                            <td class="nk-tb-col">
                                                <span class="tb-sub">{{ $deposit->tx_id }}</span>
                                            </td>
                                            <td class="nk-tb-col">
                                                <span class="tb-lead">{{ $deposit->amount }}</span>
                                            </td>
                                            <td class="nk-tb-col">
                                                <span class="tb-product">
                                                    <span class="title">{{ $deposit->receiver_account }} <small>{{ $deposit->receiver_name }}</small></span>
                                                </span>
                                            </td>
                                            <td class="nk-tb-col">
                                                <span class="tb-sub">{{ $deposit->bank_name }}</span>
                                            </td>
                                            <td class="nk-tb-col">
                                                <span class="tb-sub">
                                                    {{ substr($deposit->remark,0,15) }}@if (strlen($deposit->remark) > 15)...@endif
                                                </span>
                                            </td>
                                            <td class="nk-tb-col">
                                                <span class="tb-sub">{{ $deposit->created_at->format('Y-m-d h:i A') }}</span>
                                            </td>
                                            <td class="nk-tb-col">
                                                @if($deposit->status == 'pending')
                                                    <span class="tb-sub"><span class="badge badge-pill badge-warning">Pending</span></span>
                                                @elseif($deposit->status == 'success')
                                                    <span class="tb-sub"><span class="badge badge-pill badge-success">Successful</span></span>
                                                @else
                                                    <span class="tb-sub"><span class="badge badge-pill badge-danger">Failed</span></span>
                                                @endif
                                            </td>
                                            <td class="nk-tb-col nk-tb-col-tools">
                                                <ul class="nk-tb-actions gx-1 my-n1">
                                                    <li class="mr-n1">
                                                        <div class="dropdown">
                                                            <a href="#" class="dropdown-toggle btn btn-icon btn-trigger" data-toggle="dropdown"><em class="icon ni ni-more-h"></em></a>
                                                            <div class="dropdown-menu dropdown-menu-right">
                                                                <ul class="link-list-opt no-bdr">
                                                                    <li><a href="deposit/{{ $deposit->id }}"><em class="icon ni ni-eye"></em><span>View Order</span></a></li>
                                                                    <li><a href="deposit/{{ $deposit->id }}/approve"><em class="icon ni ni-check-circle-cut"></em> Approve</a></li>
                                                                    <li><a href="deposit/{{ $deposit->id }}/decline" class="btnDecline"><em class="icon ni ni-cross-circle"></em> Decline</a></li>
                                                                    <li><a href="deposit/{{ $deposit->id }}/delete" class="btnDelete"><em class="icon ni ni-trash"></em><span>Remove Order</span></a></li>
                                                                </ul>
                                                            </div>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </td>
                                        </tr>
                                    @endforeach --}}
                                </tbody>
                            </table>
                        </div>


                    </div><!-- .card-inner -->
                </div><!-- .card -->
            </div>
        </div>
    </div>

</x-admin.layout>
