<script>
    $(document).ready(function () {
        $(".cancelbtn").click(function () {
            $("#id01").hide();
        });

        //if the dismiss hints button is clicked upon, then direct client on how they can activate hints
        $('.modal-content').submit(function (e) {
            //a function to deactivate hints from database
            if(confirm("Are you sure to Deactivate System Hints?")){
                e.preventDefault();
                $.post(
                    'assets/hints_update.php',
                    {
                        dismiss: $("#dis_val").val()
                    }
                );
                $("#hints").hide();
                $("#dismissed-hints").show();
            }else{
                return false;
            }
        });

        $(".confirm").click(function () {
            $("#id01").hide();
        });
    });
</script>

    <?php if(auth()->user()->hints != 0): ?>
<div id="id01" class="modal">
    <!--    <span onclick="document.getElementById('id01').style.display='none'" class="close" title="Close Modal">×</span>-->
    <form method="POST" class="modal-content" action="{{}}">
        <div class="containa" id="hints">
            <?php if(app('CompanyDetails')->type == 2): ?>
                <?php echo '<div style="font-size: 15px; color: #FF0000; font-weight: bold; text-align: center">You are on Read Only Mode </div>'; ?>

            <?php else: ?>
                <?php echo $__env->yieldContent('modal_heading'); ?>
                <?php echo $__env->yieldContent('modal_title'); ?>


            <?php endif; ?>
            <input type="hidden" name="dismiss" value="0" id="dis_val">
            <div class="clearfix">
                <button id="btn1" type="submit" class="dismiss">Dismiss All Hints</button>
                <button id="btn2" type="button" class="cancelbtn">Got It</button>

            </div>
        </div>
        <div class="containa" id="dismissed-hints">
            <p>You can still activate hints from your Profile.</p>
            <p>Thank you.</p>
            <div class="clearfix">
                <button id="btn3" type="button"  class="confirm">Okay</button>
            </div>
        </div>
    </form>
</div>

<script>
    // Get the modal
    //var modal = document.getElementById('id01');

    // When the user clicks anywhere outside of the modal, close it
    //window.onclick = function(event) {
    // if (event.target == modal) {
    // modal.style.display = "none";
    // }
    //  }
</script>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\finewood\resources\views/layouts/hints.blade.php ENDPATH**/ ?>