import './bootstrap'
import React from 'react'
import { createRoot } from 'react-dom/client'
import { createInertiaApp } from '@inertiajs/react'
import CollectionShow from './Pages/Collection/CollectionShow'
import CollectionSeriesShow from './Pages/Collection/CollectionSeriesShow'
import CollectionManage from './Pages/Collection/CollectionManage'
import CollectionFeaturedIndex from './Pages/Collection/CollectionFeaturedIndex'
import SavedCollections from './Pages/Collection/SavedCollections'
import CollectionStaffSurfaces from './Pages/Collection/CollectionStaffSurfaces'
import CollectionStaffProgramming from './Pages/Collection/CollectionStaffProgramming'
import CollectionDashboard from './Pages/Collection/CollectionDashboard'
import CollectionAnalytics from './Pages/Collection/CollectionAnalytics'
import CollectionHistory from './Pages/Collection/CollectionHistory'
import NovaCardsAdminIndex from './Pages/Collection/NovaCardsAdminIndex'
import NovaCardsTemplateAdmin from './Pages/Collection/NovaCardsTemplateAdmin'

const pages = {
  'Collection/CollectionShow': CollectionShow,
  'Collection/CollectionSeriesShow': CollectionSeriesShow,
  'Collection/CollectionManage': CollectionManage,
  'Collection/CollectionFeaturedIndex': CollectionFeaturedIndex,
  'Collection/SavedCollections': SavedCollections,
  'Collection/CollectionStaffSurfaces': CollectionStaffSurfaces,
  'Collection/CollectionStaffProgramming': CollectionStaffProgramming,
  'Collection/CollectionDashboard': CollectionDashboard,
  'Collection/CollectionAnalytics': CollectionAnalytics,
  'Collection/CollectionHistory': CollectionHistory,
  'Collection/NovaCardsAdminIndex': NovaCardsAdminIndex,
  'Collection/NovaCardsTemplateAdmin': NovaCardsTemplateAdmin,
}

createInertiaApp({
  resolve: (name) => pages[name],
  setup({ el, App, props }) {
    const root = createRoot(el)
    root.render(<App {...props} />)
  },
})
