<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">

<head>
    <meta charset="utf-8">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>
        @yield('title')
    </title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description">
    <meta content="Coderthemes" name="author">
    <!-- App favicon -->
    <link rel="shortcut icon" href="{{asset('Admin/assets/images/INNSOTECH.png') }}">
    <link rel="icon" href="{{asset('Admin/assets/images/INNSOTECH.png') }}" type="image/x-icon">

    <!-- App css -->
    <link href="{{asset('Admin/assets/css/icons.min.css') }}" rel="stylesheet" type="text/css">
    <link href="{{asset('Admin/assets/css/app.min.css') }}" rel="stylesheet" type="text/css" id="light-style">
    <link href="{{asset('Admin/assets/css/app-dark.min.css') }}" rel="stylesheet" type="text/css" id="dark-style">
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">


</head>

<body class="loading" data-layout-config='{"leftSideBarTheme":"dark","layoutBoxed":false, "leftSidebarCondensed":false, "leftSidebarScrollable":false,"darkMode":false, "showRightSidebarOnStart": true}'>
    <!-- Begin page -->
    <div class="wrapper">
        <!-- ========== Left Sidebar Start ========== -->
        <div class="leftside-menu">

            <!-- LOGO -->
            <a href="{{ url('home') }}" class="logo text-center logo-light">
                <span class="logo-lg">
                    <img src="{{asset('Admin/assets/images/logosinfondo.png') }}" alt="" height="50">
                </span>
                <span class="logo-sm">
                    <img src="{{asset('Admin/assets/images/INNSOTECH.png') }}" alt="" height="20">
                </span>
            </a>

            <!-- LOGO -->
            <a href="{{ url('home') }}" class="logo text-center logo-dark">
                <span class="logo-lg">
                    <img src="{{asset('Admin/assets/images/LogoInnsotech.png') }}" alt="" height="50">
                </span>
                <span class="logo-sm">
                    <img src="{{asset('Admin/assets/images/INNSOTECH.png') }}" alt="" height="20">
                </span>
            </a>

            <div class="h-100" id="leftside-menu-container" data-simplebar="">

                <!--- Sidemenu -->
                <ul class="side-nav">

                    <li id="liHome" class="side-nav-item">
                        <a id="aHome" href="{{ url('home') }}" class="side-nav-link">
                            <i class="uil-home-alt"></i>
                            <span> Inicio </span>
                        </a>
                    </li>
                    
                    <li id="liConfig" class="side-nav-item">
                        <a id="aConfig" data-bs-toggle="collapse" href="#sidebarEmpresa" aria-expanded="false" aria-controls="sidebarEmpresa" class="side-nav-link">
                            <i class="uil-bright"></i>
                            <span> Configuración </span>
                            <span class="menu-arrow"></span>
                        </a>
                        <div class="collapse" id="sidebarEmpresa">
                            <ul class="side-nav-second-level">
                                
                                <li id="liEmpresas">
                                    <a href="{{url('almacen/empresa')}}"><i class="uil-building"></i> Centros Médicos</a>
                                </li>
                                
                            </ul>
                        </div>
                    </li>
                    
                    <li id="liAlmacen" class="side-nav-item">
                        <a id="aAlmacen" data-bs-toggle="collapse" href="#sidebarAlmacen" class="side-nav-link">
                            <i class="uil-package"></i>
                            <span> Almacen </span>
                            <span class="menu-arrow"></span>
                        </a>
                        <div class="collapse" id="sidebarAlmacen">
                            <ul class="side-nav-second-level">
                                @can('articulo-list')
                                <li id="liArticulos">
                                    <a href="{{url('almacen/articulo')}}"><i class="uil-tag-alt"></i> Articulo</a>
                                </li>
                                @endcan
                                @can('almacen-list')
                                <li id="liCategorias">
                                    <a href="{{url('almacen/almacenes')}}"><i class="uil-archive"></i> Almacenes</a>
                                </li>
                                @endcan
                            </ul>
                        </div>
                    </li>
                    
                    <li id="liCompras" class="side-nav-item">
                        <a id="aCompras" data-bs-toggle="collapse" href="#sidebarCompras" aria-expanded="false" aria-controls="sidebarCompras" class="side-nav-link">
                            <i class="uil-shopping-cart-alt"></i>
                            <span> Compras </span>
                            <span class="menu-arrow"></span>
                        </a>
                        <div class="collapse" id="sidebarCompras">
                            <ul class="side-nav-second-level">
                                @can('ingreso-list')
                                <li id="liIngresos">
                                    <a href="{{url('compras/ingreso')}}"><i class="uil-cart"></i> Ingresos</a>
                                </li>
                                @endcan
                                @can('proveedor-list')
                                <li id="liProveedores">
                                    <a href="{{ url('compras/proveedor') }}"><i class="uil-truck"></i> Proveedores</a>
                                </li>
                                @endcan
                            </ul>
                        </div>
                    </li>

                    <li id="liAcceso" class="side-nav-item">
                        <a id="aAcceso" data-bs-toggle="collapse" href="#sidebarAcceso" aria-expanded="false" aria-controls="sidebarAcceso" class="side-nav-link">
                            <i class="uil-padlock"></i>
                            <span> Accesos </span>
                            <span class="menu-arrow"></span>
                        </a>
                        <div class="collapse" id="sidebarAcceso">
                            <ul class="side-nav-second-level">
                                @can('user-list')
                                <li id="liUsuarios">
                                    <a href="{{url('users')}}"><i class="uil-users-alt"></i> Usuarios</a>
                                </li>
                                @endcan
                                @can('role-list')
                                <li id="liRoles">
                                    <a href="{{url('roles')}}"><i class="uil-unlock"></i> Roles</a>
                                </li>
                                @endcan
                                @can('permission-list')
                                <li id="liPermisos">
                                    <a href="{{url('permissions')}}"><i class="uil-shield-check"></i> Permisos</a>
                                </li>
                                @endcan
                            </ul>
                        </div>
                    </li>

            


                </ul>

                <!-- End Sidebar -->

                <div class="clearfix"></div>

            </div>
            <!-- Sidebar -left -->

        </div>
        <!-- Left Sidebar End -->

        <!-- ============================================================== -->
        <!-- Start Page Content here -->
        <!-- ============================================================== -->

        <div class="content-page">
            <div class="content">
                <!-- Topbar Start -->
                <div class="navbar-custom">
                    <ul class="list-unstyled topbar-menu float-end mb-0">

                        <li class="dropdown notification-list">
                            <a class="nav-link dropdown-toggle arrow-none" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
                                <i class="dripicons-bell noti-icon"></i>
                                <span class="noti-icon-badge"></span>
                            </a>
                            <div class="dropdown-menu dropdown-menu-end dropdown-menu-animated dropdown-lg">

                                <!-- item-->
                                <div class="dropdown-item noti-title">
                                    <h5 class="m-0">
                                        <span class="float-end">
                                            <a href="javascript: void(0);" class="text-dark">
                                                <small>Eliminar todo</small>
                                            </a>
                                        </span>Nuevas Notificaciones
                                    </h5>
                                </div>

                                <div style="max-height: 230px;" data-simplebar="">
                                    <!-- item-->
                                    <a href="javascript:void(0);" class="dropdown-item notify-item">
                                        <div class="notify-icon bg-primary">
                                            <i class="mdi mdi-comment-account-outline"></i>
                                        </div>
                                        <p class="notify-details">Ninguna Notificacion
                                            <small class="text-muted"><?php 
                                            $mytime = Carbon\Carbon::now();
                                            echo $mytime->format('F Y');
                                            ?></small>
                                        </p>
                                    </a>
                                </div>

                                <!-- All-->
                                <a href="javascript:void(0);" class="dropdown-item text-center text-primary notify-item notify-all">
                                    Ver todas notificaciones
                                </a>

                            </div>
                        </li>
                        <li class="dropdown notification-list">
                            <a class="nav-link dropdown-toggle nav-user arrow-none me-0" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
                                <span class="account-user-avatar"> 
                                    <img src="{{asset('imagenes/usuarios/logo.jpg')}}"  alt="user-image" class="rounded-circle">
                                </span>
                                <span>
                                    <span class="account-user-name">{{ Auth::user()->name }}</span>
                                    <span class="account-position">{{ Auth::user()->email }}</span>
                                </span>
                            </a>
                            <div class="dropdown-menu dropdown-menu-end dropdown-menu-animated topbar-dropdown-menu profile-dropdown">
                                <!-- item-->
                                <div class=" dropdown-header noti-title">
                                    <h6 class="text-overflow m-0">Bienvenidos !</h6>
                                </div>

                                <!-- item-->
                                <a href="{{ route('users.show', Auth::user()->id)}}" class="dropdown-item notify-item">
                                    <i class="mdi mdi-account-circle me-1"></i>
                                    <span>Perfil</span>
                                </a>

                              

                                <!-- item-->
                                <a href="{{ route('logout') }}" class="dropdown-item notify-item" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                                    <i class="mdi mdi-logout me-1"></i>
                                    <span>{{ __('Cerrar Sesión') }}</span>
                                    <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                      @csrf
                                    </form>
                                </a>
                            </div>
                        </li>

                    </ul>
                    <button class="button-menu-mobile open-left">
                        <i class="mdi mdi-menu"></i>
                    </button>
                </div>
                <!-- end Topbar -->

                <!-- Start Content-->
                <div class="container-fluid">

                    <!-- start page title -->
                    @yield('contenido')
                    <!-- end page title -->

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

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

            <!-- Footer Start -->
            <footer class="footer text-center">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-12" style="color: #343a40;">
                            <script>document.write(new Date().getFullYear())</script> ©  GICRE SRL<a href="https://gicrerd.com/" target="__blank" class="text-muted ms-1"> gicrerd.com</a>
                        </div>
                    </div>
                </div>
            </footer>
            <!-- end Footer -->

        </div>

        <!-- ============================================================== -->
        <!-- End Page content -->
        <!-- ============================================================== -->


    </div>
    <!-- END wrapper -->

    <div class="rightbar-overlay"></div>
    <!-- /End-bar -->

    <!-- bundle -->
    <script src="{{asset('Admin/assets/js/vendor.min.js') }}"></script>
    <script src="{{asset('Admin/assets/js/app.min.js') }}"></script>

    <script src="{{ asset('sweetalert/sweetalert2@11.js') }}"></script>
    @stack('scripts')
    <script>
        @if (session('status'))
        Swal.fire({
            title: '{{ session('status') }}',
            icon: '{{ session('statuscode') }}',
            button: "OK!",
        });
        @endif

    </script>
    <!-- third party js ends -->
    <script>
        $(document).ready(function() {
            $('.count').each(function () {
                $(this).prop('Counter',0).animate({
                    Counter: $(this).text()
                }, {
                    duration: 4000,
                    easing: 'swing',
                    step: function (now) {
                        $(this).text(Math.ceil(now));
                    }
                });
            });
        });
    </script>
</body>
</html>