@extends('layouts.marketplace', ['title' => 'Marketplace Account - Dashboard'])

@section('content')
    <!-- Dashboard content -->
    <div class="col-lg-9 pt-2 pt-xl-3">
        <!-- Header -->
        <div class="d-flex align-items-center justify-content-between gap-3 pb-3 mb-2 mb-md-3">
            <h1 class="h2 mb-0">Dashboard</h1>
            <div class="position-relative" style="width: 190px">
                <i class="ci-calendar position-absolute top-50 start-0 translate-middle-y z-1 ms-3"></i>
                <select aria-label="Period select" class="form-select form-icon-start rounded-pill"
                    data-select='{
                  "classNames": {
                    "containerInner": ["form-select", "form-icon-start", "rounded-pill"]
                  },
                  "removeItemButton": false
                }'>
                    <option value="Current">Current month</option>
                    <option value="Last month">Last month</option>
                    <option value="Last 3 months">Last 3 months</option>
                    <option value="Last 6 months">Last 6 months</option>
                    <option value="Last year">Last year</option>
                </select>
            </div>
        </div>
        <!-- Stats -->
        <div class="row g-3 g-xl-4 pb-3 mb-2 mb-sm-3">
            <div class="col-md-4 col-sm-6">
                <div class="h-100 bg-success-subtle rounded-4 text-center p-4">
                    <h2 class="fs-sm pb-2 mb-1">Earnings (before taxes)</h2>
                    <div class="h2 pb-1 mb-2">$842.00</div>
                    <p class="fs-sm text-body-secondary mb-0">Sales 01/09/2024 - 13/09/2024</p>
                </div>
            </div>
            <div class="col-md-4 col-sm-6">
                <div class="h-100 bg-info-subtle rounded-4 text-center p-4">
                    <h2 class="fs-sm pb-2 mb-1">Your balance</h2>
                    <div class="h2 pb-1 mb-2">$735.00</div>
                    <p class="fs-sm text-body-secondary mb-0">To be paid on 15/09/2024</p>
                </div>
            </div>
            <div class="col-md-4 col-sm-12">
                <div class="h-100 bg-warning-subtle rounded-4 text-center p-4">
                    <h2 class="fs-sm pb-2 mb-1">Lifetime earnings</h2>
                    <div class="h2 pb-1 mb-2">$9,156.74</div>
                    <p class="fs-sm text-body-secondary mb-0">Based on list price</p>
                </div>
            </div>
        </div>
        <!-- Earnings chart -->
        <div class="pb-3 mb-2 mb-sm-3">
            <div class="border rounded-4 py-4 px-3 px-sm-4">
                <h2 class="h5 text-center text-sm-start mb-sm-4">Earnings history</h2>
                <canvas
                    data-chart='{
                  "type": "line",
                  "data": {
                    "labels": ["22 Aug", "", "24 Aug", "", "26 Aug", "", "28 Aug", "", "30 Aug", "", "01 Sep", "", "03 Sep", "", "05 Sep"],
                    "datasets": [
                      {
                        "label": "Sales, USD",
                        "fill": true,
                        "data": [0, 100, 200, 175, 100, 50, 75, 0, 0, 50, 50, 50, 0, 100, 0],
                        "backgroundColor": "rgba(51,179,107,.1)",
                        "borderWidth": 2,
                        "borderColor": "rgba(51,179,107,.6)",
                        "pointBackgroundColor": "#33b36b",
                        "pointBorderWidth": 3,
                        "pointBorderColor": "#33b36b",
                        "pointHoverBorderColor": "#33b36b",
                        "pointHoverBorderWidth": 6
                      }
                    ]
                  },
                  "options": {
                    "responsive": true,
                    "scales": {
                      "y": {
                        "beginAtZero": true,
                        "border": {
                          "color": "rgba(133,140,151,.18)"
                        },
                        "grid": {
                          "color": "rgba(133,140,151,.18)"
                        }
                      },
                      "x": {
                        "border": {
                          "color": "rgba(133,140,151,.18)"
                        },
                        "grid": {
                          "color": "rgba(133,140,151,.18)"
                        }
                      }
                    }
                  }
                }'></canvas>
            </div>
        </div>
        <!-- Most recent sales -->
        <div class="border rounded-4 py-4 px-3 px-sm-4">
            <div
                data-filter-list='{"searchClass": "product-search", "listClass": "product-list", "sortClass": "product-sort", "valueNames": ["product", "date", "tendered", "earning"]}'>
                <div
                    class="d-flex flex-column flex-sm-row align-items-center justify-content-between gap-3 mb-2 mb-sm-3 mb-md-4">
                    <h2 class="h5 text-center text-sm-start mb-0">Most recent sales</h2>
                    <div class="position-relative w-100" style="max-width: 250px">
                        <i class="ci-search position-absolute top-50 start-0 translate-middle-y ms-3"></i>
                        <input class="product-search form-control form-icon-start rounded-pill" placeholder="Search"
                            type="search" />
                    </div>
                </div>
                <table class="table align-middle fs-sm mb-0">
                    <thead>
                        <tr>
                            <th class="ps-0" scope="col">
                                <span class="fw-normal text-body">Product</span>
                            </th>
                            <th class="d-none d-md-table-cell" scope="col">
                                <button class="btn fw-normal text-body product-sort p-0" data-sort="date"
                                    type="button">Date</button>
                            </th>
                            <th class="d-none d-md-table-cell" scope="col">
                                <span class="fw-normal text-body">Status</span>
                            </th>
                            <th class="text-end d-none d-sm-table-cell" scope="col">
                                <button class="btn fw-normal text-body product-sort p-0 me-n2" data-sort="tendered"
                                    type="button">Tendered</button>
                            </th>
                            <th class="text-end pe-0" scope="col">
                                <button class="btn fw-normal text-body product-sort p-0 me-n2" data-sort="earning"
                                    type="button">Earning</button>
                            </th>
                        </tr>
                    </thead>
                    <tbody class="product-list">
                        <!-- Item -->
                        <tr>
                            <td class="py-3 ps-0">
                                <div
                                    class="d-flex align-items-start align-items-md-center hover-effect-scale position-relative">
                                    <div class="ratio bg-body-secondary rounded-2 overflow-hidden flex-shrink-0"
                                        style="--cz-aspect-ratio: calc(52 / 66 * 100%); width: 66px">
                                        <img alt="Image" class="hover-effect-target"
                                            src="/img/account/products/03.jpg" />
                                    </div>
                                    <div class="ps-2 ms-1">
                                        <span
                                            class="badge fs-xs text-info bg-info-subtle rounded-pill d-md-none mb-1">Pending</span>
                                        <h6 class="product mb-1 mb-md-0">
                                            <a class="fs-sm fw-medium hover-effect-underline stretched-link"
                                                href="{{ route('second', ['shop', 'product-marketplace']) }}">iPhone
                                                15 pro mockups</a>
                                        </h6>
                                        <div class="fs-body-emphasis d-sm-none mb-1">$19.00</div>
                                        <div class="fs-body-emphasis d-md-none">June 30, 2024</div>
                                    </div>
                                </div>
                            </td>
                            <td class="d-none d-md-table-cell py-3">June 30, 2024<span
                                    class="date visually-hidden">1719745200</span></td>
                            <td class="d-none d-md-table-cell py-3">
                                <span class="badge fs-xs text-info bg-info-subtle rounded-pill">Pending</span>
                            </td>
                            <td class="tendered text-end d-none d-sm-table-cell py-3">$19.00</td>
                            <td class="earning text-end py-3 pe-0">$14.25</td>
                        </tr>
                        <!-- Item -->
                        <tr>
                            <td class="py-3 ps-0">
                                <div
                                    class="d-flex align-items-start align-items-md-center hover-effect-scale position-relative">
                                    <div class="ratio bg-body-secondary rounded-2 overflow-hidden flex-shrink-0"
                                        style="--cz-aspect-ratio: calc(52 / 66 * 100%); width: 66px">
                                        <img alt="Image" class="hover-effect-target"
                                            src="/img/account/products/04.jpg" />
                                    </div>
                                    <div class="ps-2 ms-1">
                                        <span
                                            class="badge fs-xs text-success bg-success-subtle rounded-pill d-md-none mb-1">Completed</span>
                                        <h6 class="product mb-1 mb-md-0">
                                            <a class="fs-sm fw-medium hover-effect-underline stretched-link"
                                                href="{{ route('second', ['shop', 'product-marketplace']) }}">A
                                                collection of colorful
                                                items</a>
                                        </h6>
                                        <div class="fs-body-emphasis d-sm-none mb-1">$21.00</div>
                                        <div class="fs-body-emphasis d-md-none">June 29, 2024</div>
                                    </div>
                                </div>
                            </td>
                            <td class="d-none d-md-table-cell py-3">June 29, 2024<span
                                    class="date visually-hidden">1719658800</span></td>
                            <td class="d-none d-md-table-cell py-3">
                                <span class="badge fs-xs text-success bg-success-subtle rounded-pill">Completed</span>
                            </td>
                            <td class="tendered text-end d-none d-sm-table-cell py-3">$21.00</td>
                            <td class="earning text-end py-3 pe-0">$15.75</td>
                        </tr>
                        <!-- Item -->
                        <tr>
                            <td class="py-3 ps-0">
                                <div
                                    class="d-flex align-items-start align-items-md-center hover-effect-scale position-relative">
                                    <div class="ratio bg-body-secondary rounded-2 overflow-hidden flex-shrink-0"
                                        style="--cz-aspect-ratio: calc(52 / 66 * 100%); width: 66px">
                                        <img alt="Image" class="hover-effect-target"
                                            src="/img/account/products/05.jpg" />
                                    </div>
                                    <div class="ps-2 ms-1">
                                        <span
                                            class="badge fs-xs text-success bg-success-subtle rounded-pill d-md-none mb-1">Completed</span>
                                        <h6 class="product mb-1 mb-md-0">
                                            <a class="fs-sm fw-medium hover-effect-underline stretched-link"
                                                href="{{ route('second', ['shop', 'product-marketplace']) }}">House
                                                plants website
                                                template</a>
                                        </h6>
                                        <div class="fs-body-emphasis d-sm-none mb-1">$35.00</div>
                                        <div class="fs-body-emphasis d-md-none">June 28, 2024</div>
                                    </div>
                                </div>
                            </td>
                            <td class="d-none d-md-table-cell py-3">June 28, 2024<span
                                    class="date visually-hidden">1719572400</span></td>
                            <td class="d-none d-md-table-cell py-3">
                                <span class="badge fs-xs text-success bg-success-subtle rounded-pill">Completed</span>
                            </td>
                            <td class="tendered text-end d-none d-sm-table-cell py-3">$35.00</td>
                            <td class="earning text-end py-3 pe-0">$26.25</td>
                        </tr>
                        <!-- Item -->
                        <tr>
                            <td class="py-3 ps-0">
                                <div
                                    class="d-flex align-items-start align-items-md-center hover-effect-scale position-relative">
                                    <div class="ratio bg-body-secondary rounded-2 overflow-hidden flex-shrink-0"
                                        style="--cz-aspect-ratio: calc(52 / 66 * 100%); width: 66px">
                                        <img alt="Image" class="hover-effect-target"
                                            src="/img/account/products/07.jpg" />
                                    </div>
                                    <div class="ps-2 ms-1">
                                        <span
                                            class="badge fs-xs text-success bg-success-subtle rounded-pill d-md-none mb-1">Completed</span>
                                        <h6 class="product mb-1 mb-md-0">
                                            <a class="fs-sm fw-medium hover-effect-underline stretched-link"
                                                href="{{ route('second', ['shop', 'product-marketplace']) }}">A
                                                stunning set of tablet pro
                                                mockups</a>
                                        </h6>
                                        <div class="fs-body-emphasis d-sm-none mb-1">$18.00</div>
                                        <div class="fs-body-emphasis d-md-none">June 27, 2024</div>
                                    </div>
                                </div>
                            </td>
                            <td class="d-none d-md-table-cell py-3">June 27, 2024<span
                                    class="date visually-hidden">1719486000</span></td>
                            <td class="d-none d-md-table-cell py-3">
                                <span class="badge fs-xs text-success bg-success-subtle rounded-pill">Completed</span>
                            </td>
                            <td class="tendered text-end d-none d-sm-table-cell py-3">$18.00</td>
                            <td class="earning text-end py-3 pe-0">$13.50</td>
                        </tr>
                        <!-- Item -->
                        <tr>
                            <td class="py-3 ps-0">
                                <div
                                    class="d-flex align-items-start align-items-md-center hover-effect-scale position-relative">
                                    <div class="ratio bg-body-secondary rounded-2 overflow-hidden flex-shrink-0"
                                        style="--cz-aspect-ratio: calc(52 / 66 * 100%); width: 66px">
                                        <img alt="Image" class="hover-effect-target"
                                            src="/img/account/products/08.jpg" />
                                    </div>
                                    <div class="ps-2 ms-1">
                                        <span
                                            class="badge fs-xs text-danger bg-danger-subtle rounded-pill d-md-none mb-1">Canceled</span>
                                        <h6 class="product mb-1 mb-md-0">
                                            <a class="fs-sm fw-medium hover-effect-underline stretched-link"
                                                href="{{ route('second', ['shop', 'product-marketplace']) }}">Multi
                                                device mockup PSD</a>
                                        </h6>
                                        <div class="fs-body-emphasis d-sm-none mb-1">$27.00</div>
                                        <div class="fs-body-emphasis d-md-none">June 26, 2024</div>
                                    </div>
                                </div>
                            </td>
                            <td class="d-none d-md-table-cell py-3">June 26, 2024<span
                                    class="date visually-hidden">1719399600</span></td>
                            <td class="d-none d-md-table-cell py-3">
                                <span class="badge fs-xs text-danger bg-danger-subtle rounded-pill">Canceled</span>
                            </td>
                            <td class="tendered text-end d-none d-sm-table-cell py-3">$27.00</td>
                            <td class="earning text-end py-3 pe-0">$0.00</td>
                        </tr>
                    </tbody>
                </table>
                <!-- Pagination -->
                <div class="d-flex align-items-center justify-content-between pt-4 gap-3">
                    <div class="fs-sm">Showing <span class="fw-semibold">5</span> of <span
                            class="fw-semibold">20</span><span class="d-none d-sm-inline"> results</span>
                    </div>
                    <nav aria-label="Pagination">
                        <ul class="pagination">
                            <li aria-current="page" class="page-item active">
                                <span class="page-link">
                                    1
                                    <span class="visually-hidden">(current)</span>
                                </span>
                            </li>
                            <li class="page-item">
                                <a class="page-link" href="#">2</a>
                            </li>
                            <li class="page-item">
                                <a class="page-link" href="#">3</a>
                            </li>
                            <li class="page-item">
                                <a class="page-link" href="#">4</a>
                            </li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('scripts')
@endsection
