<!DOCTYPE html>
<html class="no-jss" lang="{{app()->getLocale()}}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>{{ config('app.name', 'Laravel') }} | @yield('title', 'Shop')</title>
    <meta name="description" content="{{getSettingsOf("site_description")}}">
    <meta name="keywords" content="{{getSettingsOf("site_keywords")}}">
    <meta name="author" content="{{getSettingsOf("site_title")}}">

    <link rel="shortcut icon" href="{{ url("img/favicon.png") }}" type="image/x-icon">
    <link rel="icon" href="{{ url("img/favicon.png") }}" type="image/x-icon">

    <link rel="stylesheet" href="{{ url('css/app.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/magnific-popup.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/animate.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/owl.carousel.min.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/themify-icons.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/icofont.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/meanmenu.min.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/bundle.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/style.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/responsive.css') }}">
    <link rel="stylesheet" href="{{ url('frontend/css/custom.css') }}">

    <link href="{{ url('backend/vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ url('backend/vendor/fontawesome-free/css/v4-shims.css') }}" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="{{ url('backend/vendor/select2/css/select2.min.css') }}">
    <!-- Multi Select CSS== -->
    <link rel="stylesheet" type="text/css" href="{{url("vendor/bootstrap-multiselect/bootstrap-multiselect.css")}}">

    <link rel="stylesheet" type="text/css" href="{{url("vendor/util.css")}}">
    <link rel="stylesheet" type="text/css" href="{{url("vendor/sticky-whatsapp.css")}}">

    <link rel="stylesheet" href="{{ url('vendor/swal2-style.css') }}">
    <livewire:styles/>
    @yield('style')
</head>
<body style="backgrounds: #ffffff">
    @include('partials.frontend.header')

    @include('partials.frontend.flash')

    @yield('content')

    @include('partials.frontend.footer')
    @include('frontend.components.btn-sticky-whatsapp')

    <livewire:scripts/>
    <script src="{{ url('vendor/sweetalert/sweetalert.all.js') }}"></script>
    <x-livewire-alert::flash />
    <x-livewire-alert::scripts />

    <script src="{{ url('js/app.js') }}"></script>
    <script src="{{ url('frontend/js/vendor/modernizr-2.8.3.min.js') }}"></script>
    <script src="{{ url('frontend/js/vendor/jquery-1.12.0.min.js') }}"></script>
    <script src="{{ url('frontend/js/jquery.magnific-popup.min.js') }}"></script>
    <script src="{{ url('frontend/js/isotope.pkgd.min.js') }}"></script>
    <script src="{{ url('frontend/js/imagesloaded.pkgd.min.js') }}"></script>
    <script src="{{ url('frontend/js/jquery.counterup.min.js') }}"></script>
    <script src="{{ url('frontend/js/waypoints.min.js') }}"></script>
    <script src="{{ url('frontend/js/ajax-mail.js') }}"></script>
    <script src="{{ url('frontend/js/owl.carousel.min.js') }}"></script>
    <script src="{{ url('frontend/js/plugins.js') }}"></script>
    <script src="{{ url('frontend/js/main.js') }}"></script>
    <script src="{{ url('frontend/js/jquery.magnific-popup.min.js') }}"></script>
    <script src="{{ url('frontend/js/alert-message.js') }}"></script>
    <script src="{{ url('https://kit.fontawesome.com/8003f9e0e2.js') }}" crossorigin="anonymous"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script>

    <script type="text/javascript" src="{{url('vendor/bootstrap-multiselect/bootstrap-multiselect.js')}}"></script>
    <script type="text/javascript" src="{{ url('backend/vendor/select2/js/select2.full.min.js') }}"></script>

    <script>

        $(document).ready(function() {
            let bloodhound = new Bloodhound({
                datumTokenizer: Bloodhound.tokenizers.whitespace,
                queryTokenizer: Bloodhound.tokenizers.whitespace,
                remote: {
                    url: '{{url("search")}}?productName=%QUERY%', //'/user/find?q=%QUERY%',
                    wildcard: '%QUERY%'
                },
            });

            $('#search').typeahead({
                hint: true,
                highlight: true,
                minLength: 1
            }, {
                name: 'products',
                source: bloodhound,
                limit: 10,
                display: function(data) {
                    return data.name  //Input value to be set when you select a suggestion.
                },
                templates: {
                    empty: [
                        '<div class="list-group-item text-danger">{{__('There are no matching search results')}}</div>'
                    ],
                    header: [
                        '<div class="list-group search-results-dropdown">'
                    ],
                    suggestion: function(data) {
                        return '<div style="font-weight:normal; width:100%" class="list-group-item"><a href="{{url('product')}}/'+data.slug+'">' + data.name + '</a></div></div>'
                    }
                }
            });
        });
    </script>

    @include('shared.services-js')

    @yield('script')
</body>
</html>
