<!-- ============================================================== -->
<aside class="left-sidebar ">
    <!-- Sidebar scroll-->
    <div class="scroll-sidebar">
        <!-- User Profile-->
        <div class="user-profile">
            <div class="user-pro-body">
                <div class="text-center">

                    <i class="text-center fa fa-user fa-2x"></i>
                </div>
                <div class="dropdown">
                    <a href="javascript:void(0)" class="dropdown-toggle u-dropdown link hide-menu" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                        {{ Auth::user()->name }} <span class="caret"></span></a>
                    <div class="dropdown-menu animated flipInY">
                        <!-- text-->
                        <a href="{{route('management.profile.edit')}}" class="dropdown-item"><i class="ti-user"></i> My Profile</a>

                        <!-- text-->
                        <div class="dropdown-divider"></div>
                        <!-- text-->
                        <a class="nav-link waves-effect waves-dark" href="{{ route('management.logout') }}"
                           onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>  {{ __('Logout') }}
                        </a>

                        <form id="logout-form" action="{{ route('management.logout') }}" method="POST" style="display: none;">
                            @csrf
                        </form>

                        <!-- text-->
                    </div>
                </div>
            </div>
        </div>
        <!-- Sidebar navigation-->
        <nav class="sidebar-nav">
            <ul id="sidebarnav">
                <li>
                    <a class="waves-effect waves-dark" href="/" aria-expanded="false" target="_blank">
                        <i class="ti-settings text-success"></i>
                        <span class="hide-menu">Visit Website</span>
                    </a>
                </li>
                <li>
                    <a class="waves-effect waves-dark" href="{{ route('management.dashboard.index') }}" aria-expanded="false" >
                        <i class="ti-settings text-success"></i>
                        <span class="hide-menu">Dashboard</span>
                    </a>
                </li>
@role('admin')
                <li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="ti-settings"></i><span class="hide-menu">Website Settings</span></a>
                    <ul aria-expanded="false" class="collapse">
                        <li><a href="{{ route('management.settings.index') }}">General Settings</a></li>
                        <li><a href="{{ route('management.settings.seo-logo') }}">Website Logo</a></li>
                        <li><a href="{{ route('management.settings.seo-title') }}">SEO Meta Tags</a></li>
                        <li><a href="{{ route('management.settings.seo-scripts') }}">Google Analytics</a></li>
                        <li><a href="{{ route('management.settings.social-media') }}">Social Media Links</a></li>
                        <li><a href="{{ route('management.about.index') }}">About Page</a></li>

                    </ul>
                </li>
                @endrole


                @role('admin')
                <li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="ti-settings"></i><span class="hide-menu">Countries</span></a>
                    <ul aria-expanded="false" class="collapse">
                        <li><a href="{{ route('management.country.index') }}">All Countries</a></li>
                       {{-- <li><a href="{{ route('management.country.create') }}">Create Country</a></li>--}}

                    </ul>
                </li>
                @endrole
                <li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="ti-settings"></i><span class="hide-menu">Products/Policies</span></a>
                    <ul aria-expanded="false" class="collapse">
                        <li><a href="{{ route('management.products.index') }}"> @role('admin') @else My @endrole Country Policies</a></li>
                        <li><a href="{{ route('management.products.my-uploads') }}">My Policy Uploads</a></li>
                        <li><a href="{{ route('management.products.create') }}">Create Policy</a></li>

                    </ul>
                </li>


               <li> <a class="has-arrow waves-effect waves-dark" href="javascript:void(0)" aria-expanded="false"><i class="ti-settings"></i><span class="hide-menu">My Profile /Users</span></a>
                    <ul aria-expanded="false" class="collapse">
                        <li><a href="{{ route('management.profile.edit') }}">My Account</a></li>
                        @role('admin')
                        <li><a href="{{ route('management.users.index') }}">All Users</a></li>
                        <li><a href="{{ route('management.users.create') }}">Create User</a></li>
                        @endrole

                    </ul>
                </li>


                <li>
                    <a class="nav-link waves-effect waves-dark" href="{{ route('management.logout') }}"
                       onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>  {{ __('Logout') }}
                    </a>

                    <form id="logout-form" action="{{ route('management.logout') }}" method="POST" style="display: none;">
                        @csrf
                    </form>

                </li>

            </ul>
        </nav>
        <!-- End Sidebar navigation -->
    </div>
    <!-- End Sidebar scroll-->
</aside>
<!-- ============================================================== -->
