import { component, register, mount } from 'riot'

import App from './components/app.riot'
import LoginPage from './components/login-page.riot'
import RegisterPage from './components/register-page.riot'
import ChatSidebar from './components/chat-sidebar.riot'
import ChatRoom from './components/chat-room.riot'
import CreateRoomModal from './components/create-room-modal.riot'
import InviteModal from './components/invite-modal.riot'
import DeleteRoomModal from './components/delete-room-modal.riot'
import ClearConfirmModal from './components/clear-confirm-modal.riot'
import MessageBubble from './components/message-bubble.riot'
import ProfilePage from './components/profile-page.riot'

// Register all components
register('login-page', LoginPage)
register('register-page', RegisterPage)
register('chat-sidebar', ChatSidebar)
register('chat-room', ChatRoom)
register('create-room-modal', CreateRoomModal)
register('invite-modal', InviteModal)
register('delete-room-modal', DeleteRoomModal)
register('clear-confirm-modal', ClearConfirmModal)
register('message-bubble', MessageBubble)
register('profile-page', ProfilePage)

// Mount the app
const mountApp = component(App)
mountApp(document.getElementById('app'))
