<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $__env->yieldContent('title', 'Dashboard Izin Tamu'); ?></title>
    <link rel="icon" type="image/x-icon" href="<?php echo e(asset('images/logo.png')); ?>">

    <!-- Meta tag anti-cache -->
    <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />

    <!-- Tailwind CSS -->
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">

    <style>
        body { font-family: 'Inter', sans-serif; }
        @keyframes pulse-slow {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.1); opacity: 1; }
        }
        .animate-pulse-slow {
            animation: pulse-slow 4s infinite cubic-bezier(0.4, 0, 0.6, 1);
        }
    </style>

    <?php echo $__env->yieldContent('head'); ?>
</head>
<body class="bg-slate-900 text-gray-200">

    <div class="min-h-screen flex flex-col items-center p-8 md:p-12">
        <main class="w-full max-w-7xl mx-auto space-y-12">
            <?php echo $__env->yieldContent('content'); ?>
        </main>
    </div>

    
    <?php if(in_array('no-back-history', request()->route()->gatherMiddleware())): ?>
    <script>
        // blok back button
        history.pushState(null, null, location.href);
        window.onpopstate = function () {
            window.location.href = "<?php echo e(url()->current()); ?>";
        };

        // force reload jika halaman diambil dari bfcache
        window.addEventListener('pageshow', function(event) {
            if (event.persisted || (window.performance && window.performance.getEntriesByType("navigation")[0].type === "back_forward")) {
                window.location.href = "<?php echo e(url()->current()); ?>";
            }
        });
    </script>
    <?php endif; ?>

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

    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
    <script>
    document.addEventListener("DOMContentLoaded", function() {
        // Konfirmasi hapus
        document.querySelectorAll('.delete-confirm').forEach(form => {
            form.addEventListener('submit', function(e) {
                e.preventDefault();
                Swal.fire({
                    title: 'Apakah Anda yakin?',
                    text: "Data yang dihapus tidak bisa dikembalikan!",
                    icon: 'warning',
                    showCancelButton: true,
                    confirmButtonColor: '#d33',
                    cancelButtonColor: '#6c757d',
                    confirmButtonText: 'Ya, hapus!',
                    cancelButtonText: 'Batal'
                }).then((result) => {
                    if (result.isConfirmed) {
                        form.submit();
                    }
                });
            });
        });

        // Toast sukses
        <?php if(session('success')): ?>
            Swal.fire({
                toast: true,
                position: 'top-end',
                icon: 'success',
                title: "<?php echo e(session('success')); ?>",
                showConfirmButton: false,
                timer: 3000,
                timerProgressBar: true
            });
        <?php endif; ?>
    });
    </script>


</body>
</html>
<?php /**PATH D:\Hafiiz\Project\Code Magang\Finall\Apps Asama Layer Security\booking-ruangan-tamu\resources\views/izin_tamu/layout.blade.php ENDPATH**/ ?>