@extends('admin.layouts.layout')

@section('container_content')


    <!-- ------------ top nav ------------- -->
   
    <!--Contents-->
    <main class="main">
        @if(count($errors))
            <div class="alert alert-danger">
                @foreach($errors->all() as $error)
                    <li>
                        {{$error}}
                    </li>
                @endforeach
            </div>
        @endif

        @if (session('message'))
            <div class="alert alert-success message_alert">{{session('message')}}</div>
        @endif

        <div class="alert alert-danger ajaxErrorResponse" style="display: none"></div>
        <div class="alert alert-success ajaxResponse" style="display: none"></div>

    <!-- Response of ajax requests -->


        @yield('content')
    </main>

    <!--Footer-->
    <footer class="">
        <div class="loading hide">
            <div class="loader"></div>
        </div>
    </footer>
    <!--End-Footer-->
    <!-- -------------- request ----------------- -->
    <!-- <a class="to-top" data-scroll href="#bazinga" id="scroll-btn">
        <i class="fa fa-arrow-up"></i>
    </a> -->
@endsection

@section('container_js')
    {{--    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>--}}
    <script src="{{ asset('assets/admin/js/lib/axios.min.js') }}"></script>

    <script>
        axios.defaults.headers.common = {
            'X-Requested-With': 'XMLHttpRequest',
            'X-CSRF-TOKEN' : document.querySelector('meta[name="csrf-token"]').getAttribute('content')
        };
    </script>
    <script src="{{ asset('assets/admin/js/actions.js') }}"></script>
    @yield('inner_js')
@endsection
