<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <title> @yield('title')</title>
    <!-- <meta http-equiv="refresh" content="20"> See the difference? -->
    <!-- Favicon-->
    <link rel="icon" href="{{asset('images/modulegs/favicon.png')}}" type="image/x-icon">

    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">

    <!-- Bootstrap Core Css -->
    <link href="{{asset('plugins/modulegs/bootstrap/css/bootstrap.css')}}" rel="stylesheet">

    <!-- Waves Effect Css -->
    <link href="{{asset('plugins/modulegs/node-waves/waves.css')}}" rel="stylesheet" />

    <!-- Animation Css -->
    <link href="{{asset('plugins/modulegs/animate-css/animate.css')}}" rel="stylesheet" />

    <!--WaitMe Css-->
    <link href="{{asset('plugins/modulegs/waitme/waitMe.css')}}" rel="stylesheet" />

    <!-- Custom Css -->
    <link href="{{asset('css/modulegs/style.css')}}" rel="stylesheet">

    <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
    <link href="{{asset('css/modulegs/themes/theme-red.css')}}" rel="stylesheet" />
    <script >
        var r = document.querySelector(':root');
        r.style.setProperty('--color1', "{{ $couleur }}");
        r.style.setProperty('--color2', "{{ $couleur3 }}");
        r.style.setProperty('--color4', "{{ $couleur2 }}");
    </script>
</head>

<body class="theme-red">
    <!-- Page Loader -->
    <div class="page-loader-wrapper">
        <div class="loader">
            <div class="preloader">
                <div class="spinner-layer pl-red">
                    <div class="circle-clipper left">
                        <div class="circle"></div>
                    </div>
                    <div class="circle-clipper right">
                        <div class="circle"></div>
                    </div>
                </div>
            </div>
            <p>Please wait...</p>
        </div>
    </div>
    <!-- #END# Page Loader -->
    <!-- Overlay For Sidebars -->
    <div class="overlay"></div>
    <!-- #END# Overlay For Sidebars -->
    <!-- Search Bar -->
    @include('modulegs.partials.header')
    <!-- #Top Bar -->

    <section>
        <!-- Left Sidebar -->
        @include('modulegs.partials.lsidebar')
        <!-- #END# Left Sidebar -->
        <!-- Right Sidebar -->
        <!-- @include('modulegs.partials.rsidebar')
        <!-- #END# Right Sidebar -->
    </section>

    @yield('content')

    <!-- Jquery Core Js -->
    <script src="{{asset('plugins/modulegs/jquery/jquery.min.js')}}"></script>

    <!-- Bootstrap Core Js -->
    <script src="{{asset('plugins/modulegs/bootstrap/js/bootstrap.js')}}"></script>

    <!-- Select Plugin Js -->
    <script src="{{asset('plugins/modulegs/bootstrap-select/js/bootstrap-select.js')}}"></script>

    <!-- Slimscroll Plugin Js -->
    <script src="{{asset('plugins/modulegs/jquery-slimscroll/jquery.slimscroll.js')}}"></script>

    <!-- Waves Effect Plugin Js -->
    <script src="{{asset('plugins/modulegs/node-waves/waves.js')}}"></script>

    <!-- Wait Me Plugin Js -->
    <script src="{{asset('plugins/modulegs/waitme/waitMe.js')}}"></script>

    <!-- Custom Js -->
    <script src="{{asset('js/modulegs/admin.js')}}"></script>
    <script src="{{asset('js/modulegs/pages/cards/colored.js')}}"></script>

    <!-- Demo Js -->
    <script src="{{asset('js/modulegs/demo.js')}}"></script>
    <script>
        function removeEnter(string){
            sp = string.split('\n')
            result = ""
            for(i=0; i< sp.length; i++){
                result+= sp[i]
            }
            return result;
        }
        function removeSpace(string){
            string = removeEnter(string)
            sp = string.split(' ')
            result = ""
            for(i=0; i< sp.length; i++){
                result+= sp[i]
            }
            return result;
        }

        $(function(){
            $('#search').bind('focus change input', function(){
                $('#myContent .card').parent().css('display','block').css('visibility','visible')
                $('#myContent .card').each(function(){
                    var current_input = $('#search').val()
                    //console.log(current_input)
                    //var text = removeSpace( $(this).text() )
                    //var text2 = removeSpace( $(this).text() )
                    var text =  $(this).text()
                    var text2 =  $(this).text()
                    text = text.toLocaleLowerCase()
                    var sp = text.split( current_input )
                    console.log("sp = "+sp)
                    var sp2 = text2.split( current_input )
                    if (  sp.length <2 &&  sp2.length <2 ){
                        $(this).parent().css('display','none').css('visibility','invisible')
                    }
                })

            })
        });

        window.setTimeout(function() {
            $(".alert").fadeTo(500, 0).slideUp(500, function(){
                $(this).remove();
            });
        }, 4000);
    </script>
    <script type="text/javascript">
        (function(d, m){
            var kommunicateSettings = {
                "appId":"7e31307d24d1eef9ac9bc33e1025485b",
                "askUserDetails": ["name", "email", "phone"],
                "onInit": function (){
                    setTimeout(function() { Kommunicate.logout();}, 7200000 )
                },
                "labels": {
                    'closed.conversation.message': 'Conversation marquée résolue',
                    'start.new': 'Nouvelle conversation',
                    'online': 'En ligne',
                    'offline': 'Hors ligne',
                    'lead.collection': {
                        'email':'Email',
                        'name':'Entrer votre nom ici',
                        'phone':'Entrer votre contact ',
                        'heading':'Avant de commencer, nous avons juste besoin de quelques détails pour que nous puissions mieux vous servir',
                        'submit':'Lancer une conversation',
                    },
                    'filter.conversation.list': {
                        'ALL_CONVERSATIONS': 'All conversations',
                        'ACTIVE_CONVERSATIONS': ' ',
                        'HIDE_RESOLVED': ' Cacher les conversations résolues ',
                        'SHOW_RESOLVED': ' Montrer les conversations résolues '
                    },
                    'csat.rating': {
                        'CONVERSATION_RATED': ' Vous avez noté cette discussion',
                        'RATE_CONVERSATION': ' Notez cette discussion',
                        'RESTART_CONVERSATION': ' ',
                        'OTHER_QUERIES': ' Délai de réponse épuisé. La conversation a été marquée résolue',
                        'SUBMIT_RATING' : 'Soumettre'
                    }
                }
            };
            /----------------- Kommunicate settings end ------------------/
            var s = document.createElement("script"); s.type = "text/javascript"; s.async = true;
            s.src = "https://widget.kommunicate.io/v2/kommunicate.app";
            var h = document.getElementsByTagName("head")[0]; h.appendChild(s);
            window.kommunicate = m; m._globals = kommunicateSettings;
        })(document, window.kommunicate || {});
        /* NOTE : Use web server to view HTML files as real-time update will not work if you directly open the HTML file in the browser. */
    </script>
</body>
</html>
