// import external dependencies
import $ from 'jquery';

// Import everything from autoload
import './autoload/_bootstrap'

// import local dependencies
import Router from './utils/Router';
import common from './routes/common';
import ucebnicaShow from './routes/ucebnicaShow';
import vzdelavanieIndex from './routes/vzdelavanieIndex';
import ucebnicaSekciaEdit from './routes/ucebnicaSekciaEdit';
import ucebnicaSekciaShow from './routes/ucebnicaSekciaShow';
import ucebnicaSekciaIndex from './routes/ucebnicaSekciaIndex';
import ucebnicaSekciaCreate from './routes/ucebnicaSekciaCreate';

window.jQuery = $;
window.$ = $;

/** Populate Router instance with DOM routes */
const routes = new Router({
  // All pages
  common,
  ucebnicaShow,
  vzdelavanieIndex,
  ucebnicaSekciaEdit,
  ucebnicaSekciaShow,
  ucebnicaSekciaIndex,
  ucebnicaSekciaCreate,
});

// Load Events
jQuery(document).ready(() => routes.loadEvents());
