import { mountInertiaRoot } from './bootstrap'
import React from 'react'
import { createInertiaApp } from '@inertiajs/react'
import FollowingFeed  from './Pages/Feed/FollowingFeed'
import TrendingFeed   from './Pages/Feed/TrendingFeed'
import HashtagFeed    from './Pages/Feed/HashtagFeed'
import SavedFeed      from './Pages/Feed/SavedFeed'
import SearchFeed     from './Pages/Feed/SearchFeed'

const pages = {
  'Feed/FollowingFeed': FollowingFeed,
  'Feed/TrendingFeed':  TrendingFeed,
  'Feed/HashtagFeed':   HashtagFeed,
  'Feed/SavedFeed':     SavedFeed,
  'Feed/SearchFeed':    SearchFeed,
}

createInertiaApp({
  resolve: (name) => pages[name],
  setup({ el, App, props }) {
    mountInertiaRoot(el, App, props)
  },
})
