// jQuery bootstrap — must be first
import $ from 'jquery';
window.$ = window.jQuery = $;

import 'jquery-ui/themes/base/all.css';

// Load jQuery UI and then the rest of the app without top-level await
(async () => {
  // Ensure jQuery UI loads after jQuery is on window
  await import('jquery-ui/ui/widgets/datepicker');
  // Load the rest of the app only after jQuery + jQuery UI are ready
  await import('./main-app.js');
})();
