@push('scripts')
    <script>
        document.addEventListener('submit', function (event) {
            var form = event.target;
            if (!(form instanceof HTMLFormElement)) return;
            var msg = form.getAttribute('data-operational-confirm');
            if (!msg) return;
            if (form.dataset.confirmed === '1') {
                form.dataset.confirmed = '';
                return;
            }
            event.preventDefault();
            if (!window.confirm(msg)) return;
            form.dataset.confirmed = '1';
            form.requestSubmit();
        });
    </script>
@endpush
