<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title inertia>{{ config('app.name', 'Laravel') }}</title>

        <!-- Fonts -->
        <link rel="preconnect" href="https://fonts.bunny.net">
        <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />

        <script>
            // Load Capacitor bridge when running inside the Android APK WebView.
            // This keeps the web app working normally in browsers.
            (function () {
                try {
                    var ua = String(navigator.userAgent || '');
                    if (!ua.includes('Capacitor')) return;
                    var script = document.createElement('script');
                    script.src = 'capacitor://localhost/capacitor.js';
                    script.async = false;
                    document.head.appendChild(script);
                } catch (e) {}
            })();
        </script>

        <!-- Scripts -->
        @routes
        @vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])
        @inertiaHead
    </head>
    <body class="font-sans antialiased">
        @inertia
    </body>
</html>
