<!doctype html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>" <?php if(app()->getLocale() !== 'en'): ?> dir="rtl" <?php endif; ?>>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- CSRF Token -->
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <link rel="shortcut icon" href="<?php echo e(asset('favicon.ico')); ?>" type="image/x-icon">
    <title><?php echo e(__('lang.app_title')); ?> - <?php echo $__env->yieldContent('title'); ?></title>
    <link rel="stylesheet" href="<?php echo e(asset('admin/css/main.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('admin/css/animate.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('admin/toastr/toastr.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('admin/sweetalert/sweetalert2.min.css')); ?>">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">

    <?php echo $__env->yieldPushContent('styles'); ?>

</head>

<body class="app sidebar-mini">
    <!-- Navbar-->
    <header class="app-header"><a class="app-header__logo" href="<?php echo e(route('home')); ?>"><?php echo e(__('lang.library')); ?></a>
        <!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar"
            aria-label="Hide Sidebar"></a>
        <!-- Navbar Right Menu-->
        <ul class="app-nav">
            
            <!--Notification Menu-->
            
            <!-- Language Menu-->
            <li class="dropdown"><a class="app-nav__item" href="#" data-bs-toggle="dropdown"
                    aria-label="Open Profile Menu"><i class="bi bi-translate fs-4"></i></a>
                <ul class="dropdown-menu settings-menu dropdown-menu-right">
                    <a class="dropdown-item" href="<?php echo e(route('change-language', 'en')); ?>">English</a>
                    <a class="dropdown-item" href="<?php echo e(route('change-language', 'ps')); ?>">پښتو</a>
                    <a class="dropdown-item" href="<?php echo e(route('change-language', 'dr')); ?>">دری</a>
                </ul>
            </li>
            <!-- User Menu-->
            <li class="dropdown"><a class="app-nav__item" href="#" data-bs-toggle="dropdown"
                    aria-label="Open Profile Menu"><i class="bi bi-person fs-4"></i></a>
                <ul class="dropdown-menu settings-menu dropdown-menu-right">
                    <li><a class="dropdown-item" <?php if(app()->getLocale()!='en'): ?>style="text-align: right"<?php endif; ?>
                            href="<?php echo e(route('users.setting')); ?>"><i class="bi bi-gear me-2 fs-5"></i>
                            <?php echo e(__('lang.change_password')); ?></a>
                    </li>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(['users.create', 'users.read', 'users.edit'])): ?>
                    <li><a class="dropdown-item" <?php if(app()->getLocale()!='en'): ?>style="text-align: right"<?php endif; ?>
                            href="<?php echo e(route('users.index')); ?>"><i class="bi bi-people me-2 fs-5"></i>
                            <?php echo e(__('lang.users')); ?></a>
                    </li>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('backup.database')): ?>
                    <li><a class="dropdown-item" <?php if(app()->getLocale()!='en'): ?>style="text-align: right"<?php endif; ?>
                            href="<?php echo e(route('backup.database')); ?>"><i class="bi bi-layer-backward me-2 fs-5"></i>
                            <?php echo e(__('lang.take_db_backup')); ?></a>
                    </li>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('backup.download')): ?>
                    <li><a class="dropdown-item" <?php if(app()->getLocale()!='en'): ?>style="text-align: right"<?php endif; ?>
                            href="<?php echo e(route('backup.download')); ?>"><i class="bi bi-cloud-download-fill me-2 fs-5"></i>
                            <?php echo e(__('lang.download_files_backup')); ?></a>
                    </li>
                    <?php endif; ?>
                    <li>
                        <a class="dropdown-item" <?php if(app()->getLocale()!='en'): ?>style="text-align: right"<?php endif; ?> href="<?php echo e(route('logout')); ?>" onclick="event.preventDefault();
                            document.getElementById('logout-form').submit();">
                            <i class="bi bi-box-arrow-<?php echo e((app()->getLocale()=='en')?'right':'left'); ?> me-2 fs-5"></i> <?php echo e(__('lang.logout')); ?>

                        </a>

                        <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" class="d-none">
                            <?php echo csrf_field(); ?>
                        </form>
                    </li>
                </ul>
            </li>
        </ul>
    </header>
    <!-- Sidebar menu-->
    <div class="app-sidebar__overlay" data-toggle="sidebar"></div>
    <aside class="app-sidebar">
        <div class="app-sidebar__user"><img class="app-sidebar__user-avatar" src="<?php echo e(asset('logo.png')); ?>"
                alt="User Image">
            <div>
                <p class="app-sidebar__user-name"><?php echo e(auth()->user()->name); ?></p>
                <p class="app-sidebar__user-designation"><?php echo e(auth()->user()->user_type); ?></p>
            </div>
        </div>
        <?php echo $__env->make('layouts.sideNav', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </aside>
    <main class="app-content">
        <?php echo $__env->yieldContent('content'); ?>
    </main>

    <form id="frm_delete" method="POST">
        <?php echo csrf_field(); ?>
        <?php echo method_field('DELETE'); ?>
    </form>
    <!-- Essential javascripts for application to work-->
    <script src="<?php echo e(asset('admin/js/jquery-3.7.0.min.js')); ?>"></script>
    <script src="<?php echo e(asset('admin/js/main.js')); ?>"></script>
    <script src="<?php echo e(asset('admin/js/bootstrap.min.js')); ?>"></script>
    <script src="<?php echo e(asset('admin/toastr/toastr.min.js')); ?>"></script>
    <script src="<?php echo e(asset('admin/sweetalert/sweetalert2.all.js')); ?>"></script>
    <script type="text/javascript" src="<?php echo e(asset('admin/js/plugins/printThis.js')); ?>"></script>

    <!-- Page specific javascripts-->
    <?php echo $__env->yieldPushContent('scripts'); ?>

    <script>
        $(document).ready(function() {
            $("form").submit(function() {
                $(this).find(":submit").attr("disabled", "disabled");
                var txt=$(this).find(":submit").text();
                $(this).find(":submit").html(`<span class="spinner-border spinner-border-sm" aria-hidden="true"></span>
                    <span role="status">${txt}</span>`);
            });
        });
        $(".pagination").attr('dir','ltr');
        <?php if(app()->getLocale()!="en"): ?>
        $("th").addClass('text-end');
        <?php endif; ?>
        toastr.options = {
            "positionClass": "toast-bottom-right",
            "timeOut": "4000",
            "extendedTimeOut": "1000",
            "closeButton": true,
            "progressBar": true
        };
        <?php if(session()->has('msg')): ?>
            toastr.success("<?php echo e(session()->get('msg')); ?>", "<?php echo e(__('lang.notice')); ?>")
        <?php endif; ?>
        <?php if(session()->has('error')): ?>
            toastr.error("<?php echo e(session()->get('error')); ?>", "<?php echo e(__('lang.error')); ?>")
        <?php endif; ?>
        $("#btnPrint").click(function(){
            $('.printDiv').printThis();
        })


        //global delete action
        $(document).on("click",".btn-delete",function(){
            var deleteRoute=$(this).attr('route');
            Swal.fire({
                title: "<?php echo e(__('messages.confirm_delete')); ?>",
                text: "",
                icon: "warning",
                showCancelButton: true,
                confirmButtonColor: "#3085d6",
                cancelButtonColor: "#d33",
                confirmButtonText: "<?php echo e(__('lang.delete')); ?>",
                cancelButtonText: "<?php echo e(__('lang.cancel')); ?>"
                }).then((result) => {
                if (result.isConfirmed) {
                    $("#frm_delete").attr('action',deleteRoute);
                    $("#frm_delete").submit();
                }
            });
        })
    </script>
</body>

</html><?php /**PATH D:\Laravel\mohe_library\resources\views/layouts/app.blade.php ENDPATH**/ ?>