@extends('store.layouts.layout')

@section('container_content')
    @include('store.layouts.menu')


    <!-- ------------ top nav ------------- -->
        <section class="top-nav py-4">
            <div class="container">
                <div class="toggelmenu">
                    <span></span>
                    <span></span>
                    <span></span>
                    <i class="fas fa-arrow-right"></i>
                </div>
                <!-- <a href="#" class="butn">
                    <span> مشاهده الموقع </span>
                </a> -->
                <a href="{{ route('store_logout') }}" class="butn butn_blue">
                    <div class="cont">
                        <span>  {{ __('dashboard.logout') }} </span>
                    </div>
                    <img src="{{ asset('assets/admin/images/butn_shap.png') }} " alt="" class="shape">
                </a>
            </div>
        </section>

    <!--<section class="top-nav">-->
    <!--    <div class="row">-->
    <!--        <div class="col-lg-5">-->
    <!--            <div class="title py-4">-->
    <!--                <h3>{{ $title ?? __('dashboard.title')}}</h3>-->

    <!--            </div>-->
    <!--        </div>-->
            <!-- <div class="col-lg-4">
    <!--            <div class="search-bar">-->
    <!--                <form>-->
    <!--                    <div class="form-group">-->
    <!--                        <input class="form-control" type="text" placeholder="search">-->
    <!--                        <button><i class="fas fa-search"></i></button>-->
    <!--                    </div>-->
    <!--                </form>-->
    <!--            </div>-->
    <!--        </div> -->-->
    <!--        <div class="col-lg-3">-->
                <!--<ul class="notivacations m-0">-->
                <!--    <li class="items notivacat">-->
                <!--        <div class="icon">-->
                <!--            <i class="far fa-bell"></i>-->
                <!--            <span class="num">-->
                <!--                1-->
                <!--            </span>-->
                <!--        </div>-->
                <!--    </li>-->
                <!--</ul>-->
    <!--        </div>-->
    <!--        <div class="col-lg-4">-->
                <!--<div class="profile-nav">-->
                <!--    <div class="info w-50">-->
                        <!--<h5>{{ $currentUserInfo->name ?? '' }}</h5>-->
                <!--    </div>-->
                <!--    <div class="user-img dropdown show mr-3">-->
                <!--        <a href="#" class="dropdown-toggle" role="button" id="dropdownMenuLink" data-toggle="dropdown">-->
                <!--            <img src="{{ asset($currentUserInfo->photo) }}" alt="">-->
                <!--        </a>-->
                <!--        <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">-->
                <!--            <div class="pic text-center">-->
                <!--                <img src="{{ asset($currentUserInfo->photo) }}" alt="">-->
                <!--                <h5>{{ $currentUserInfo->name ?? '' }}</h5>-->
                <!--            </div>-->
                            <!-- <a class="dropdown-item" href="#"><i class="far fa-user"></i> my profile</a> -->
                <!--            {{--<a class="dropdown-item" href="{{ route('admin_settings') }}"> <i class="fas fa-sliders-h"></i>{{ __('dashboard.settings') }}</a>--}}-->
                <!--            <a class="dropdown-item" href="{{ route('admin_logout') }}"-->
                <!--               onclick="event.preventDefault();document.getElementById('logout-form').submit();"><i class="fas fa-sign-out-alt"></i> {{ __('dashboard.logout') }}-->
                <!--            </a>-->

                <!--        </div>-->
                <!--    </div>-->
                <!--</div>-->

    <!--        </div>-->
    <!--    </div>-->
    <!--    <div class="toggelmenu">-->
    <!--        <span></span>-->
    <!--        <span></span>-->
    <!--        <span></span>-->
    <!--        <i class="fas fa-arrow-right"></i>-->
    <!--    </div>-->
    <!--</section>-->

    <form id="logout-form" action="{{ route('admin_logout') }}" method="POST" style="display: none;">
        @csrf
    </form>
    <!--Contents-->
    <main class="main">
        <div id="errors">
            @if(count($errors))
                <div class="alert alert-danger">
                    @foreach($errors->all() as $error)
                        <li>
                            {{$error}}
                        </li>
                    @endforeach
                </div>
            @endif
        </div>

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

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


    <!-- Response of ajax requests -->
        <div class="alert alert-danger ajaxErrorResponse" style="display: none"></div>
        <div class="alert alert-success ajaxResponse" style="display: none"></div>

        @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')
        };
        var allOptionLabel= '{{ __("main.all") }}'
        var mainOptionLabel= '{{ __("main.main") }}'

    </script>
    @yield('inner_js')
    <script src="{{ asset('assets/admin/js/actions.js') }}"></script>
    {{-- <script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
    <script src="{{ asset('assets/admin/js/charts.js') }}"></script> --}}
@endsection
