<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>@yield('title', 'Login')</title>




    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    <link rel="stylesheet" href="{{ asset('toaster/toaster.min.css') }}">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    @vite('resources/css/app.css')
</head>

<body>
    @yield('content')

    <script src="{{ asset('jquery/jquery.min.js') }}"></script>
    <script src="{{ asset('toaster/toaster.min.js') }}"></script>
    <script src="https://www.paypal.com/sdk/js?client-id={{ env('PAYPAL_CLIENT_ID') }}&components=buttons"></script>
    <script src="https://www.google.com/recaptcha/api.js?render={{env('SITE_KEY')}}"></script>
    <script>
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
    </script>

    @stack('scripts')
    <script>
    
       @if (session()->has('success'))
            toastr.success("{{ session('success') }}")
        @endif

        @if (session()->has('error'))
            toastr.error("{{ session('error') }}")
        @endif
              function submitForm(event) {
    event.preventDefault();

    grecaptcha.ready(function () {
        grecaptcha.execute('{{env('SITE_KEY')}}', { action: 'register' }).then(function (token) {
            document.getElementById('recaptcha_token').value = token;
            document.getElementById('registration_form').submit();
        });
    });
}
    </script>
</body>

</html>
