import { RBoxApp } from './components/rbox-app.js';
// Define the custom element
customElements.define('rbox-app', RBoxApp);
// Instantiate the main application class
const app = new RBoxApp();
// Append the app to the body (if not already in index.html)
// document.body.appendChild(app);
// Register service worker for PWA
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/static/service-worker.js')
.then(registration => {
console.log('Service Worker registered with scope:', registration.scope);
})
.catch(error => {
console.log('Service Worker registration failed:', error);
});
});
}