<style>
    .badge {
        position: relative;
        top: -15px;
        left: -25px;
        border: 1px solid red;
        border-radius: 50%;
        background-color: red;
    }
</style>

<!-- top navigation -->
<div class="top_nav">
    <div class="nav_menu">
        <nav>
            <div class="nav toggle">
                <a id="menu_toggle"><i class="fa fa-bars"></i></a>
            </div>

            <ul class="nav navbar-nav navbar-right">
                <li class="nav-item">
                    <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown"
                       aria-expanded="false">
                        @if(empty(Auth::user()->photo))
                            <img src="{{ asset('images/user.png') }}" alt="profile picture">
                        @else
                            <img src="{{ url('/') }}/public/images/{{Auth::user()->photo}}" alt="profile picture">
                        @endif
                            @if(isAdmin())
                               {{__('Admin')}}
                            @else
                            {{ Auth::user()->first_name }} {{ Auth::user()->last_name }}
                            @endif
                        <span class=" fa fa-angle-down"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-usermenu pull-right">
                        @if(isAdmin())
                        <li><a href="#" onclick="event.preventDefault();$(`#admin-info-modal`).modal('show')">
                                 {{__('Profile Change')}}
                            </a></li>
                        @endif
                        <li>
                            <form method="post" action="{{ route('user.logout') }}">
                                {{ csrf_field() }}
                                <button type="submit"
                                        style="background-color: #fff; border: none;margin-top: 10px; margin-left:13px; color: #5A738E;"
                                        data-toggle="tooltip" data-placement="top" title="Logout">Log Out <i
                                        class="fa fa-sign-out pull-right" style="margin-right: 15px;"></i></button>
                            </form>
                        </li>
                    </ul>
                </li>
                @include('partials.supportsubmenu')

            </ul>
        </nav>
    </div>
</div>
@include('partials.admin_info')
<!-- /top navigation -->
@push('script')
    <script>
        $(document).ready(function () {
            common_helper.formValidate('#admin_info_form',
                { 'email': {required:true,email:true}, 'current_password': 'required'},
                {
                    'email': {required: "Please enter your email"},
                    'current_password': {required: "Please enter your Current Password"}
                }
            );
        })
        $("#show_hide_password a").on('click', function (event) {
            common_helper.globalPasswordView('#show_hide_password', event);
        });
    </script>
@endpush
