<?php
    $ui ??= \App\Support\SiteContent::ui();
    $languages ??= ['ps' => 'پښتو', 'fa' => 'دری', 'ar' => 'العربية', 'en' => 'English'];
    $nav ??= \App\Support\SiteContent::shared()['nav'];
    $currentLocale ??= app()->getLocale();
    $pageDir = $currentLocale === 'en' ? 'ltr' : 'rtl';
    $footerRights = [
        'ps' => 'ټول حقوق خوندي دي.',
        'fa' => 'تمامی حقوق محفوظ است.',
        'ar' => 'جميع الحقوق محفوظة.',
        'en' => 'All rights reserved.',
    ][$currentLocale] ?? 'ټول حقوق خوندي دي.';
?>
<!doctype html>
<html lang="<?php echo e($currentLocale); ?>" dir="<?php echo e($pageDir); ?>">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <meta name="description" content="<?php echo e($ui['meta_description']); ?>">
    <title><?php echo $__env->yieldContent('title', $ui['brand']); ?></title>
    <link rel="preconnect" href="https://fonts.bunny.net">
    <link href="https://fonts.bunny.net/css?family=noto-naskh-arabic:400,500,600,700|outfit:400,500,600,700" rel="stylesheet">
    <?php echo app('Illuminate\Foundation\Vite')(['resources/css/app.css', 'resources/js/app.js']); ?>
</head>
<body>
    <a class="skip-link" href="#content"><?php echo e($ui['skip']); ?></a>
    <div class="ambient-geometry" aria-hidden="true">
        <span class="geo-motif geo-motif--one"></span>
        <span class="geo-motif geo-motif--two"></span>
        <span class="geo-motif geo-motif--three"></span>
    </div>

    <header class="site-header">
        <div class="topline" id="live-meta" data-default-zone="Asia/Kabul">
            <div class="container topline__grid">
                <p class="topline__blessing"><?php echo e($ui['bismillah']); ?></p>
                <div class="topline__dates" aria-live="polite">
                    <span><i data-lucide="calendar-days" aria-hidden="true"></i><em id="date-gregorian">...</em></span>
                    <span><i data-lucide="moon-star" aria-hidden="true"></i><em id="date-hijri-qamari">...</em></span>
                    <span><i data-lucide="sun-medium" aria-hidden="true"></i><em id="date-hijri-shamsi">...</em></span>
                </div>
                <div class="topline__time">
                    <span class="topline__location"><i data-lucide="map-pin" aria-hidden="true"></i><em id="location-label">کابل، افغانستان</em></span>
                    <i data-lucide="clock-3" aria-hidden="true"></i>
                    <strong id="clock-time">--:--:--</strong>
                </div>
                <div class="topline__actions">
                    <label class="topline-select" aria-label="Languages">
                        <i data-lucide="languages" aria-hidden="true"></i>
                        <select data-language-select>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $localeCode => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                <option value="<?php echo e(route('locale.switch', $localeCode)); ?>" <?php if($currentLocale === $localeCode): echo 'selected'; endif; ?>><?php echo e($language); ?></option>
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                        </select>
                    </label>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->guard()->check()): ?>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->user()->isAdmin()): ?>
                            <a class="topline-link" href="<?php echo e(route('admin.dashboard')); ?>"><?php echo e($ui['admin']); ?></a>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        <form class="logout-form logout-form--top" method="post" action="<?php echo e(route('logout')); ?>">
                            <?php echo csrf_field(); ?>
                            <button type="submit"><?php echo e($ui['logout']); ?></button>
                        </form>
                    <?php else: ?>
                        <a class="topline-link" href="<?php echo e(route('login')); ?>"><i data-lucide="log-in" aria-hidden="true"></i><?php echo e($ui['login']); ?></a>
                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            </div>
        </div>

        <nav class="navbar" aria-label="اصلي لارښود">
            <div class="container navbar__inner">
                <a class="brand" href="<?php echo e(route('home')); ?>" aria-label="<?php echo e($ui['brand']); ?>">
                    <img src="<?php echo e(asset('images/logo.png')); ?>" alt="<?php echo e($ui['brand']); ?>">
                    <span>
                        <strong><?php echo e($ui['brand']); ?></strong>
                        <small><?php echo e($ui['brand_en']); ?></small>
                    </span>
                </a>

                <button class="nav-toggle" type="button" aria-expanded="false" aria-controls="main-nav" data-nav-toggle>
                    <span></span>
                    <span></span>
                    <span></span>
                    <span class="sr-only">لارښود پرانيستل</span>
                </button>

                <div class="navlinks" id="main-nav" data-nav-menu>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $nav; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <a href="<?php echo e(route($item['route'])); ?>" class="<?php echo \Illuminate\Support\Arr::toCssClasses(['is-active' => request()->routeIs($item['route'])]); ?>"><?php echo e($item['label']); ?></a>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                </div>
            </div>
        </nav>
    </header>

    <main id="content">
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('status')): ?>
            <div class="container flash-message" role="status"><?php echo e(session('status')); ?></div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

        <?php echo $__env->yieldContent('content'); ?>
    </main>

    <footer class="footer">
        <div class="container footer__grid">
            <section class="footer__brand">
                <img src="<?php echo e(asset('images/logo.png')); ?>" alt="">
                <h2><?php echo e($ui['brand']); ?></h2>
                <p><?php echo e($ui['footer_copy']); ?></p>
            </section>

            <section>
                <h3><?php echo e($ui['footer_links']); ?></h3>
                <div class="footer__links">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $nav; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <a href="<?php echo e(route($item['route'])); ?>"><?php echo e($item['label']); ?></a>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                    <a href="<?php echo e(route('donate')); ?>">مرسته او صدقات</a>
                </div>
            </section>

            <section>
                <h3><?php echo e($ui['footer_services']); ?></h3>
                <div class="footer__links">
                    <a href="<?php echo e(route('darul-ifta')); ?>"><?php echo e(collect($nav)->firstWhere('route', 'darul-ifta')['label'] ?? 'Darul Ifta'); ?></a>
                    <a href="<?php echo e(route('departments')); ?>"><?php echo e(collect($nav)->firstWhere('route', 'departments')['label'] ?? 'Departments'); ?></a>
                    <a href="<?php echo e(route('publications')); ?>"><?php echo e(collect($nav)->firstWhere('route', 'publications')['label'] ?? 'Publications'); ?></a>
                </div>
            </section>

            <section>
                <h3><?php echo e($ui['footer_contact']); ?></h3>
                <p class="footer__meta"><i data-lucide="map-pin" aria-hidden="true"></i> کابل، افغانستان</p>
                <p><?php echo e($ui['contact_hint']); ?></p>
                <div class="language-row" aria-label="ژبې">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $localeCode => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                        <a href="<?php echo e(route('locale.switch', $localeCode)); ?>" class="<?php echo \Illuminate\Support\Arr::toCssClasses(['is-active' => $currentLocale === $localeCode]); ?>"><?php echo e($language); ?></a>
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                </div>
                <div class="footer-theme">
                    <span><?php echo e($ui['theme']); ?></span>
                    <button class="theme-toggle footer-theme-toggle" type="button" data-theme-toggle aria-label="<?php echo e($ui['theme']); ?>">
                        <i data-lucide="sun" aria-hidden="true"></i>
                        <i data-lucide="moon" aria-hidden="true"></i>
                    </button>
                </div>
            </section>
        </div>
        <div class="footer__bottom">
            <div class="container">© <?php echo e(date('Y')); ?> <?php echo e($ui['brand']); ?>. <?php echo e($footerRights); ?></div>
        </div>
    </footer>
</body>
</html>
<?php /**PATH /Applications/MAMP/htdocs/jrk-website/resources/views/site/layout.blade.php ENDPATH**/ ?>