<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>{{ $pageTitle ?? config('app.name') }}</title>
    @if(!empty($pageAssets))
        @foreach($pageAssets as $asset)
            @if(str_ends_with($asset, '.css'))
                <link rel="stylesheet" href="{{ $asset }}">
            @else
                <script src="{{ $asset }}" defer></script>
            @endif
        @endforeach
    @endif
    @vite($pageEntry)
</head>
<body>
    <div id="page"></div>
    <script id="page-props" type="application/json">{!! json_encode($pageProps, JSON_UNESCAPED_UNICODE) !!}</script>
</body>
</html>
