<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=0'>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="X-UA-Compatible" content="IE=9"/>
    <meta name="Description" content="">
    <meta name="Author" content="AGBONON Kankoe Yaovi">
    <meta name="Keywords" content=""/>
    <script src='https://cdn.plot.ly/plotly-2.32.0.min.js'></script>


    <!-- Title -->
    <title> {{config('app.name')}} | @yield('tag-title')</title>
    <!-- Favicon -->
    <link rel="icon" href="{{url('assets/img/brand/favicon.png')}}" type="image/x-icon"/>

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
          rel="stylesheet">

    <!--Internal  Quill css -->
    <link href="{{url('assets/plugins/fancyuploder/fancy_fileupload.css')}}" rel="stylesheet">
    <link href="{{url('assets/plugins/quill/quill.snow.css')}}" rel="stylesheet">
    <link href="{{url('assets/plugins/quill/quill.bubble.css')}}" rel="stylesheet">

    <!---Internal Fileupload css-->
    <link href="{{url('assets/plugins/fileuploads/css/fileupload.css')}}" rel="stylesheet" type="text/css"/>
    <link href="{{url('assets/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css')}}" rel="stylesheet"
          type="text/css"/>
    <!-- Ionicons js -->
    <link href="{{url('assets/plugins/jquery-datetimepicker/jquery.datetimepicker.css')}}" rel="stylesheet">
    <!--Internal   Notify -->
    <link href="{{url('assets/plugins/notify/css/notifIt.css')}}" rel="stylesheet"/>
    <!-- Internal Select2 css -->
    <link href="{{url('assets/plugins/select2/css/select2.min.css')}}" rel="stylesheet">
    <!--- Internal Sweet-Alert css-->
    <link href="{{url('assets/plugins/sweet-alert/sweetalert.css')}}" rel="stylesheet">

    <!-- Icons css -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
          integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA=="
          crossorigin="anonymous"/>
    <link rel="stylesheet"
          href="https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/css/line-awesome.min.css"
          integrity="sha512-vebUliqxrVkBy3gucMhClmyQP9On/HAWQdKDXRaAlb/FKuTbxkjPKUyqVOxAcGwFDka79eTF+YXwfke1h3/wfg=="
          crossorigin="anonymous"/>

    <!--  Owl-carousel css-->
    <link href="{{url('assets/plugins/owl-carousel/owl.carousel.css')}}" rel="stylesheet"/>
    <!--  Custom Scroll bar-->
    <link href="{{url('assets/plugins/mscrollbar/jquery.mCustomScrollbar.css')}}" rel="stylesheet"/>
    <!--  Right-sidemenu css -->
    <link href="{{url('assets/plugins/sidebar/sidebar.css')}}" rel="stylesheet">
    <!-- Sidemenu css -->
    <link rel="stylesheet" href="{{url('assets/css/sidemenu1.css')}}">
    <!-- style css -->
    <link href="{{url('assets/css/style.css')}}" rel="stylesheet">
    <link href="{{url('assets/css/redempteur.css')}}" rel="stylesheet"/>

    @yield('page-style')


</head>

<body class="main-body app sidebar-mini">

<!-- Loader -->
<div id="global-loader">
    <img src="{{url('assets/img/loader.svg')}}" class="loader-img" alt="Loader">
</div>
<!-- /Loader -->

<!-- Page -->
<div class="page">
    <!-- main-sidebar -->
    <div class="app-sidebar__overlay" data-toggle="sidebar"></div>
    <aside class="app-sidebar sidebar-scroll">
        <div class="main-sidebar-header active">
            <a class="desktop-logo logo-light active" href=""><img src="{{url('assets/img/brand/logo.png')}}"
                                                                   class="main-logo" alt="logo"></a>
            <a class="logo-icon mobile-logo icon-light active" href=""><img
                        src="{{url('assets/img/brand/favicon.png')}}" class="logo-icon" alt="logo"></a>
        </div>
        @include('inc.menu-left')
    </aside>
    <!-- main-sidebar -->

    <!-- main-content -->
    <div class="main-content app-content">

        <!-- main-header -->
        @include('inc.header')
        <!-- /main-header -->


        <div class="container-fluid">
            <div class="breadcrumb-header justify-content-between">
                <div class="left-content">
                    <div>
                        <h2 class="main-content-title tx-24 mg-b-1 mg-b-lg-1">@yield('page-title')</h2>
                    </div>
                </div>

                <div class="main-dashboard-header-right">
                    <div>
                        <label class="tx-13">@yield('page-sub-title')</label>
                    </div>

                    @yield('header-right-content')

                </div>
            </div>

            @yield('main-content')
        </div>
        <!-- /Container -->
    </div>
    <!-- /main-content -->

    <!-- Sidebar-right-->
    <div class="sidebar sidebar-right sidebar-animate">
        <div class="panel panel-primary card mb-0 box-shadow">
            <div class="tab-menu-heading border-0 p-3">
                <div class="card-title mb-0">Notifications</div>
                <div class="card-options ml-auto">
                    <a href="#" class="sidebar-remove"><i class="fe fe-x"></i></a>
                </div>
            </div>

            <div class="panel-body tabs-menu-body latest-tasks p-0 border-0">
                <div class="tab-pane active " id="side1">

                    <div class="list d-flex align-items-center border-bottom p-3">
                        <div class="">
                            <span class="avatar bg-danger brround avatar-md">0</span>
                        </div>
                        <a class="wrapper w-100" href="#">
                            <div class="d-flex justify-content-between align-items-center">
                                <div class="d-flex align-items-center">
                                    <i class="mdi mdi-clock text-muted mr-1"></i>
                                    <p class="mb-0">7 Late Checklist</p>
                                </div>
                            </div>
                        </a>
                    </div>

                </div>

            </div>
        </div>
    </div>
</div>
<!--/Sidebar-right-->

<div class="main-footer ht-40">
    <div class="container-fluid pd-t-0-f ht-100p">
        <span>
            Copyright © 2024 <a href="#">CEDICOM GROUP</a>.
            Artised with <i class="fa fa-heart" style="color: #ff0000"></i> By <a target="_blank" href="">ANGE</a>
        </span>
    </div>
</div>
<!-- Footer closed -->
</div>
<!-- End Page -->

<audio id="myAudio" style="display: none">
    <source src="{{url('assets/sounds/alarm-frenzy-493.ogg')}}" type="audio/ogg">
    <source src="{{url('assets/sounds/alarm-frenzy-493.mp3')}}" type="audio/mpeg">
    Your browser does not support the audio element.
</audio>

@include('inc.modals')


<!-- Back-to-top -->
{{--<a href="#top" id="back-to-top"><i class="las la-angle-double-up"></i></a>--}}

<!-- JQuery min js -->
<script src="{{url('assets/plugins/jquery/jquery.min.js')}}"></script>
<!-- Bootstrap Bundle js -->
<script src="{{url('assets/plugins/bootstrap/js/bootstrap.bundle.min.js')}}"></script>
<!-- Moment js -->
<script src="{{url('assets/plugins/moment/moment.js')}}"></script>
<!-- Custom Scroll bar Js-->
<script src="{{url('assets/plugins/mscrollbar/jquery.mCustomScrollbar.concat.min.js')}}"></script>
<!-- Sticky js -->
<script src="{{url('assets/js/sticky.js')}}"></script>
<!-- Left-menu js-->
<script src="{{url('assets/plugins/side-menu/sidemenu.js')}}"></script>
<!-- Rating js-->
<script src="{{url('assets/plugins/rating/jquery.rating-stars.js')}}"></script>
<!--Internal  Perfect-scrollbar js -->
<script src="{{url('assets/plugins/perfect-scrollbar/perfect-scrollbar.min.js')}}"></script>
<!-- right-sidebar js -->
<script src="{{url('assets/plugins/sidebar/sidebar.js')}}"></script>
<script src="{{url('assets/plugins/sidebar/sidebar-custom.js')}}"></script>
<!--Internal  Sweet-Alert js-->
<script src="{{url('assets/plugins/sweet-alert/sweetalert.min.js')}}"></script>
<script src="{{url('assets/plugins/sweet-alert/jquery.sweet-alert.js')}}"></script>
<!-- Internal Select2.min js -->
<script src="{{url('assets/plugins/select2/js/select2.min.js')}}"></script>
<!--Internal  Notify js -->
<script src="{{url('assets/plugins/notify/js/notifIt.js')}}"></script>
<!--Internal  Datepicker js -->
<script src="{{url('assets/plugins/jquery-ui/ui/widgets/datepicker.js')}}"></script>
<script src="{{url('assets/plugins/jquery-datetimepicker/jquery.datetimepicker.full.min.js')}}"></script>
<script src="{{url('assets/plugins/bootstrap-tagsinput/bootstrap-tagsinput.min.js')}}"></script>
<!--Internal Fileuploads js-->
<script src="{{url('assets/plugins/fileuploads/js/fileupload.js')}}"></script>
<!--Internal Sparkline js -->
<script src="{{url('assets/plugins/jquery-sparkline/jquery.sparkline.min.js')}}"></script>

<!-- Fancyuploder js -->
<script src="{{url('assets/plugins/fancyuploder/jquery.ui.widget.js')}}"></script>
<script src="{{url('assets/plugins/fancyuploder/jquery.fileupload.js')}}"></script>
<script src="{{url('assets/plugins/fancyuploder/jquery.iframe-transport.js')}}"></script>
<script src="{{url('assets/plugins/fancyuploder/jquery.fancy-fileupload.js')}}"></script>

<!--Internal quill js -->
<script src="{{url('assets/plugins/quill/quill.min.js')}}"></script>
<script src="{{url('assets/js/form-editor.js')}}"></script>

<script src="{{url('assets/js/redempteur.js')}}"></script>
<!-- custom js -->
<script src="{{url('assets/js/custom.js')}}"></script>

<script !src="">
    //Notification.requestPermission();
    let sitehost = '';
    let _auth = '{{Auth::user()->id}}';

    $(document).ready(function () {
        @if($errors->count() > 0)
        @foreach($errors->all() as $message)
        printMessage('{{$message}}', 'warning', 'center');
        @endforeach
        @endif

        @if(Session::has('success'))
        printMessage('{{Session::get('success')}}', 'success', 'center');
        @endif

        @if(Session::has('error'))
        printMessage('{{Session::get('error')}}', 'error', 'center');
        @endif

        $('.select2').each(function () {
            $(this).select2({
                dropdownParent: $(this).parent(),
            });
        });

        $('.select2-search__field').attr('placeholder', 'Choose');

        $('.fc-datepicker').datepicker({
            showOtherMonths: true,
            selectOtherMonths: true,
            dateFormat: 'dd-mm-yy'
        });

        $('.fc-datepicker').attr('readonly', true);

        $('.datetime-input').datetimepicker({
            ownerDocument: document,
            contentWindow: window,
            value: '',
            rtl: false,
            format: 'd/m/Y H:i',
            formatTime: 'H:i',
            formatDate: 'd/m/Y',
        });

        $(document).on('change','.tag-input',function (e) {
            var $element = $(event.target),
                $container = $element.closest('.example');

            if (!$element.data('tagsinput'))
                return;

            var val = $element.val();
            if (val === null)
                val = "null";
            $('code', $('pre.val', $container)).html(($.isArray(val) ? JSON.stringify(val) : "\"" + val.replace('"', '\\"') + "\""));
            $('code', $('pre.items', $container)).html(JSON.stringify($element.tagsinput('items')));
        }).trigger('change');

        $(".image-input").dropify({
            messages: {
                default: 'Drag and drop a file here or click',
                replace: 'Drag and drop or click to replace',
                remove: 'Remove',
                error: 'Ooops, something wrong appended.',
            },
            error: {
                'fileSize': 'The file size is too big (2M max).'
            }
        });

        $('.panel-tabs a').click(function (e) {
            e.preventDefault();
            $('.panel-tabs a').removeClass('active');
            $('.tab-content .tab-pane').removeClass('active');
            $(this).addClass('active');
            $($(this).attr('href')).addClass('active');
        });

        $(document).on('click','.btn-remove-record',function (e) {
            e.preventDefault();
            var href_supprimeur = $(this).attr('href');
            var href_redirect = $(this).attr('href-redirect');
            var msg = $(this).attr('data-msg');
            if(msg==undefined)
                msg = 'Do you want to delete?';

            var msg_success = $(this).attr('data-msg-success');
            if(msg_success==undefined)
                msg_success = 'Record deleted successfully.';

            swal({
                title: "Confirmation",
                text: msg,
                type: "warning",
                showCancelButton: !0,
                confirmButtonColor: "$success",
                cancelButtonColor: "$danger",
                confirmButtonText: "Yes, do it!",
                cancelButtonText: "Cancel"
            }, function(isConfirm) {
                if (isConfirm) {
                    var req = $.ajax({
                        url: href_supprimeur,
                        type: "GET",
                        data: {param: ''},
                        dataType: "html"
                    });
                    req.done(function (response, textStatus, jqXHR) {
                        swal("Success!", msg_success, "success");
                        $('.confirm').on('click',function () {
                            window.location = href_redirect;
                        })
                    });
                    req.fail(function (jqXHR, textStatus) {
                        swal("Erreur!", "Error during operation.", "warning");
                    });
                } else {
                    //swal("Cancelled", "Your imaginary file is safe :)", "error");
                }
            });
        });

        $('.fancyuploder').each(function () {
            initFancyFileUpload($(this));
        });
    });
</script>

@yield('page-script')


</body>
</html>
