<script src="{{asset('frontend/theme_base/coinefy/js/jquery-3.7.1.min.js')}}"></script>
<script src="{{asset('frontend/theme_base/coinefy/js/bootstrap.bundle.min.js')}}"></script>
<script src="{{asset('frontend/theme_base/coinefy/js/jquery.nice-select.min.js')}}"></script>
<script src="{{asset('frontend/theme_base/coinefy/js/jquery.appear.min.js')}}"></script>
<script src="{{asset('frontend/theme_base/coinefy/js/odometer.min.js')}}"></script>
<script src="{{asset('frontend/theme_base/coinefy/js/magnific-popup.min.js')}}"></script>
<script src="{{asset('frontend/theme_base/coinefy/js/cookie.js')}}"></script>
<script src="{{asset('frontend/theme_base/coinefy/js/meanmenu.min.js')}}"></script>
<script src="{{asset('frontend/theme_base/coinefy/js/main.js')}}"></script>

<script src="{{ asset('global/js/simple-notify.min.js') }}"></script>

<script src="{{ asset('frontend/js/cookie.js') }}"></script>
<script src="{{ asset('global/js/custom.js') }}"></script>


<script>
    (function($) {
        'use strict';
        // MagnificPopup image 
        $(".popup-image").magnificPopup({
            type: "image",
            gallery: {
                enabled: true,
            },
        });

        // MagnificPopup video 
        $(".popup-video").magnificPopup({
            type: "iframe",
        });
    })(jQuery);
</script>

@include('global.__t_notify')
@if(auth()->check())
    <script src="{{ asset('global/js/pusher.min.js') }}"></script>
    @include('global.__notification_script',['for'=>'user','userId' => auth()->user()->id])
@endif

@notifyJs

@yield('script')
@stack('script')

@php
    $googleAnalytics = plugin_active('Google Analytics');
    $tawkChat = plugin_active('Tawk Chat');
    $fb = plugin_active('Facebook Messenger');
@endphp

@if($googleAnalytics)
    @include('frontend::plugin.google_analytics',['GoogleAnalyticsId' => json_decode($googleAnalytics?->data,true)['app_id']])
@endif

@if($tawkChat)
    @include('frontend::plugin.tawk',['data' => json_decode($tawkChat->data, true)])
@endif
@if($fb)
    @include('frontend::plugin.fb',['data' => json_decode($fb->data, true)])
@endif