@if ($hasBootstrapJs ?? file_exists(public_path('assets/vendor/bootstrap/js/bootstrap.bundle.min.js')))
    <script src="{{ asset('assets/vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
@endif

@if ($hasAlpine ?? file_exists(public_path('assets/vendor/alpine/alpine.min.js')))
    <script src="{{ asset('assets/vendor/alpine/alpine.min.js') }}" defer></script>
@endif

@if (($includeFullCalendar ?? false) && file_exists(public_path('assets/vendor/fullcalendar/index.global.min.js')))
    <script src="{{ asset('assets/vendor/fullcalendar/index.global.min.js') }}"></script>
@endif

@if (($includeFlatpickr ?? false) && file_exists(public_path('assets/vendor/flatpickr/flatpickr.min.js')))
    <script src="{{ asset('assets/vendor/flatpickr/flatpickr.min.js') }}"></script>
@endif

@if (file_exists(public_path('assets/js/app.js')))
    <script src="{{ asset('assets/js/app.js') }}"></script>
@endif

@stack('scripts')
