 <!--start main wrapper-->
    <main class="main-wrapper">
        <div class="main-content">

            <h3 class=" fmon fw-bolder "><i class="fa-solid fa-droplet"></i> Water Rates</h3>

            <div class="row">
                <div class="col-md-5">

                    <div class="input-group border-15">
                        <span class="input-group-text  border-15"><img src="<?php echo base_url(); ?>assets/images/serIcon.png" alt=""
                                width="25px"></span>
                        <input type="text" name="" id="" class="form-control form-Search  border-15  py-2"
                            placeholder="search">
                    </div>

                </div>
                <div class="col-md-7 d-flex justify-content-end gap-2">

                    <a href="<?php echo base_url().'site/addwaterrates'; ?>" class="btn addBtn d-flex gap-2 align-items-center"><img
                            src="<?php echo base_url(); ?>assets/images/megaIcons/aplu.png" alt="">Add Rates </a>
                    <!-- <button class="btn expButn  "><img src="<?php echo base_url(); ?>assets/images/megaIcons/xport.png" alt=""> Export
                        List</button>


                    <div class="btn bg-white d-flex gap-5 align-items-center px-3 border-15">
                        Filter <img src="<?php echo base_url(); ?>assets/images/e.png " alt="" width="20px">
                    </div> -->

                </div>
                <div>
                    <div class="table-responsive mt-3 ">
                        <table class="table table-striped table-hover">
                            <thead>
                                <tr>
                                    <th scope="col">From (m3)</th>
                                    <th scope="col">To (m3)</th>

                                    <th scope="col">Rate ($)</th>


                                    <th scope="col">Actions</th>

                                </tr>
                            </thead>
                            <div class="">
                                <tbody class="">
                                    <?php foreach ($waterRates as $key => $waterRate) { ?>
                                    <tr>
                                        <td>
                                            <p class="ft7 fmon m-0"><?php echo $waterRate['from']; ?></p>
                                        </td>
                                        <td>
                                    <p class="ft7 fmon m-0"><?php echo $waterRate['to']; ?></p>
                                        </td>
                                        <td>
                                            <p class="ft7 fmon m-0"><?php echo $waterRate['rate']; ?></p>

                                        </td>





                                        <td>
                                            <div class="d-flex gap-2 align-items-end">
                                                <a href="<?php echo base_url().'site/editwaterrates/'.$key; ?>" class="">
                                                    <img src="<?php echo base_url(); ?>assets/images/viedit.png" alt="">
                                                </a>

                                                <a href="#" class="" data-bs-toggle="modal"
                                                    data-bs-target="#deleteModal<?php echo $key; ?>">
                                                    <img src="<?php echo base_url(); ?>assets/images/delr.svg" alt="">
                                                </a>

                                            </div>
                                        </td>
                                    </tr>
                                        <div class="modal fade" id="deleteModal<?php echo $key; ?>" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true">
                                            <div class="modal-dialog">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <h5 class="modal-title" id="deleteModalLabel">Delete Water Rate</h5>
                                                    </div>
                                                    <div class="modal-body">
                                                        <p>Are you sure you want to delete this water rate?</p>
                                                    </div>
                                                    <div class="modal-footer">
                                                        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                                                        <a href="<?php echo base_url().'site/deletewaterrates/'.$key; ?>" class="btn btn-danger">Delete</a>
                                                    </div>  
                                                </div>
                                            </div>
                                        </div>


                                    <?php } ?>

                                    <!-- Add more rows as needed -->
                                </tbody>
                            </div>
                        </table>
                    </div>
                  
                </div>
            </div>
        </div>
        </div>

    </main>
    <!--end main wrapper-->

