<!--start main wrapper-->
    <main class="main-wrapper">
        <div class="main-content">
            <button class="btn guestBtn d-flex gap-2 align-items-center" id="backBtn"><img
                    src="<?php echo base_url(); ?>assets/images/arowleft.svg" alt="" width="15px"> Back</button>
            <div class="row">
                <div class="col-md-8 my-2">
                    <h3 class="fmon fw-bold"><i class="fa-solid fa-triangle-exclamation"></i> Add Warning</h3>
                </div>

            </div>
            <div class="modal-body">


                <form class="row" id="addwarningform" action="<?php echo base_url(); ?>site/addwarningdata" method="post" enctype="multipart/form-data">
                    <div class="col-md-6 my-2">


                    <select class="form-select FormInput" name="units" required id="units">
                            <option value="">Units</option>
                            <?php foreach($units as $k=> $unit){ ?>
                                <option value="<?php echo $k; ?>"><?php echo $unit['unit']; ?></option>
                            <?php } ?>
                        </select>
                    </div>

                    <div class="col-md-6 my-2">

                        <select class=" form-select FormInput" name="warning_type" id="warning_type">
                            <option value="">warning type</option>
                          
<option value="Water Leakage Detected">Water Leakage Detected</option>
<option value="Unauthorized Entry Attempt">Unauthorized Entry Attempt</option>
<option value="Elevator Out of Service">Elevator Out of Service</option>
<option value="Power Outage Alert">Power Outage Alert</option>
<option value="Gas Leak Warning">Gas Leak Warning</option>
<option value="Plumbing Issue Reported">Plumbing Issue Reported</option>
<option value="Noise Complaint Logged">Noise Complaint Logged</option>
<option value="Scheduled Maintenance Notice">Scheduled Maintenance Notice</option>
<option value="Emergency Evacuation Alert">Emergency Evacuation Alert</option>      

                        </select>
                    </div>
                    <!-- <div class="col-md-6 my-2">

                        <input type="search" name="warning" id="warning" class="form-control FormInput"
                            placeholder="warning">
                    </div> -->


                    <!-- <div class="col-md-6 my-2">

                        <input type="search" name="warning_to" id="warning_to" class="form-control FormInput"
                            placeholder="warning_to">
                    </div> -->
                    <div class="col-md-12 my-2">

                        <input type="date" name="date" id="date" required class="form-control FormInput"
                            placeholder="Occurrence At" onfocus="(this.type='date')"
                            onblur="if(!this.value) this.type='text'">
                    </div>





                    <div class="col-md-12 my-2">

                        <div class="col-md-12 my-2">
                            <textarea class="form-control FormInput"  name="comment" id="comment"
                                placeholder="comment (Max 10000 characters)" maxlength="10000"></textarea>
                            <small id="noteCount" class="form-text text-muted">0/10000</small>
                        </div>

                    </div>
                    <div class="col-m-12 my-2">
                        <div class="brower2 d-flex justify-content-center align-items-center">
                            <div class="d-flex flex-column align-items-center">
                                <img src="<?php echo base_url(); ?>assets/images/up2.png" alt="" width="20px">
                                <small>Drage and Drop here or <label for="file" class="text-primary"
                                        style="cursor: pointer;">Browse Files</label></small>
                                <input class="d-none" type="file" name="file" id="file">
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12 my-2">
                        <div class="row d-flex justify-content-center mb-3">
                            <div class="col-md-12 my-2 d-flex justify-content-center">
                                <button type="submit" class="btn autBtn py-2 px-5">Send Warning</button>
                            </div>
                        </div>
                    </div>
                </form>
                <!-- button for attahmnts -->



            </div>
        </div>
        </div>

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