@{
    ViewData["Title"] = "Data Offtaker";
    ViewData["DataOfftakerActive"] = "menu-active";
}

<div class="flex flex-col gap-2 md:flex-row md:justify-between md:gap-0">
    <div class="prose">
        <span class="text-xl font-semibold text-black">
            Data Offtaker
        </span>
    </div>

    <div class="flex flex-col gap-2 md:flex-row">
        <button class="btn btn-sm max-w-full rounded-full bg-white" onclick="modal_download.showModal()">
            <i class="ph ph-download"></i>
            Download
        </button>
        <button class="btn btn-sm bg-bank-sampah-primary-500 max-w-full rounded-full text-white">
            <i class="ph ph-plus"></i>
            Tambah Offtaker
        </button>
    </div>
</div>

<!-- Modal Download -->
<dialog id="modal_download" class="modal modal-bottom sm:modal-middle">
    <div class="modal-box w-full sm:max-w-sm">
        <form method="dialog">
            <button class="btn btn-sm btn-circle btn-ghost absolute top-2 right-2">✕</button>
        </form>
        <h3 class="text-lg font-bold">Download Data</h3>
        <form action="#" method="get">
            <fieldset class="fieldset">
                <legend class="fieldset-legend">Jumlah Nasabah</legend>
                <select class="select w-full">
                    <option disabled selected>Semua</option>
                </select>
            </fieldset>
            <div class="modal-action">
                <button type="submit" class="btn bg-bank-sampah-primary-500 w-full rounded-full text-white">Download</button>
            </div>
        </form>
    </div>
</dialog>
<!-- /modal download -->

<div class="h-6"></div>

<div class="card bg-white">
    <div class="card-body p-2">
        <partial name="~/Areas/Shared/Components/Table/_Control.cshtml" />
        <div class="overflow-x-auto">
            <table class="table-zebra table">
                <!-- head -->
                <thead>
                    <tr>
                        <th></th>
                        <th>Nama Offtaker</th>
                        <th>Kabupaten</th>
                        <th>Kecamatan</th>
                        <th>Status</th>
                        <th>Aksi</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <th>1</th>
                        <td>Andi Prabowo</td>
                        <td>Kota Adm Jakarta Timur</td>
                        <td>Cipayung</td>
                        <td>
                            <div class="badge badge-success badge-soft rounded-full">
                                Disetujui
                            </div>
                        </td>
                        <td>
                            <a href="#" class="btn btn-circle btn-primary btn-sm">
                                <i class="ph ph-eye"></i>
                            </a>
                            <a href="#" class="btn btn-circle btn-error btn-sm text-white">
                                <i class="ph ph-trash"></i>
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <th>2</th>
                        <td>Siti Nurhaliza</td>
                        <td>Kota Adm Jakarta Timur</td>
                        <td>Matraman</td>
                        <td>
                            <div class="badge badge-success badge-soft rounded-full">
                                Disetujui
                            </div>
                        </td>
                        <td>
                            <a href="#" class="btn btn-circle btn-primary btn-sm">
                                <i class="ph ph-eye"></i>
                            </a>
                            <a href="#" class="btn btn-circle btn-error btn-sm text-white">
                                <i class="ph ph-trash"></i>
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <th>3</th>
                        <td>Budi Santoso</td>
                        <td>Kota Adm Jakarta Timur</td>
                        <td>Kramat Jati</td>
                        <td>
                            <div class="badge badge-success badge-soft rounded-full">
                                Disetujui
                            </div>
                        </td>
                        <td>
                            <a href="#" class="btn btn-circle btn-primary btn-sm">
                                <i class="ph ph-eye"></i>
                            </a>
                            <a href="#" class="btn btn-circle btn-error btn-sm text-white">
                                <i class="ph ph-trash"></i>
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <th>4</th>
                        <td>Nina Sari</td>
                        <td>Kota Adm Jakarta Timur</td>
                        <td>Pulogadung</td>
                        <td>
                            <div class="badge badge-success badge-soft rounded-full">
                                Disetujui
                            </div>
                        </td>
                        <td>
                            <a href="#" class="btn btn-circle btn-primary btn-sm">
                                <i class="ph ph-eye"></i>
                            </a>
                            <a href="#" class="btn btn-circle btn-error btn-sm text-white">
                                <i class="ph ph-trash"></i>
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <th>5</th>
                        <td>Dewi Lestasi</td>
                        <td>Kota Adm Jakarta Timur</td>
                        <td>Cakung</td>
                        <td>
                            <div class="badge badge-error badge-soft rounded-full">
                                Belum Disetujui
                            </div>
                        </td>
                        <td>
                            <a href="#" class="btn btn-circle btn-primary btn-sm">
                                <i class="ph ph-eye"></i>
                            </a>
                            <a href="#" class="btn btn-circle btn-error btn-sm text-white">
                                <i class="ph ph-trash"></i>
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <th>6</th>
                        <td>Rudi Hartono</td>
                        <td>Kota Adm Jakarta Timur</td>
                        <td>Jatinegara</td>
                        <td>
                            <div class="badge badge-error badge-soft rounded-full">
                                Belum Disetujui
                            </div>
                        </td>
                        <td>
                            <a href="#" class="btn btn-circle btn-primary btn-sm">
                                <i class="ph ph-eye"></i>
                            </a>
                            <a href="#" class="btn btn-circle btn-error btn-sm text-white">
                                <i class="ph ph-trash"></i>
                            </a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <partial name="~/Areas/Shared/Components/Table/_Pagination.cshtml" />
    </div>
</div>