import { lazy } from 'react';
import URLInfo from './constants/URLInfo';

export const routes = [
  {
    path: URLInfo.HOME,
    title: '홈',
    exact: true,
    component: lazy(() => import('@src/pages/Home')),
  },
  {
    path: URLInfo.EXPLORE,
    title: '탐색하기',
    exact: true,
    component: lazy(() => import('@src/pages/Explore')),
  },
  {
    path: URLInfo.ACTIVITY,
    title: '활동',
    exact: true,
    component: lazy(() => import('@src/pages/Activity')),
  },
  {
    path: [URLInfo.LOGIN, URLInfo.REGISTER],
    title: '로그인',
    exact: true,
    component: lazy(() => import('@src/pages/Login')),
  },
  {
    path: [URLInfo.CREATE, URLInfo.RESALE],
    title: 'Create item',
    exact: true,
    component: lazy(() => import('@src/pages/Create')),
  },
  {
    path: [URLInfo.SALE, URLInfo.TOKEN],
    title: '아이템 상세',
    exact: true,
    component: lazy(() => import('@src/pages/Sale')),
  },
  {
    path: [URLInfo.PROFILE_COLLECTION, URLInfo.COLLECTION_EDIT],
    title: '프로필 컬렉션',
    exact: true,
    component: lazy(() => import('@src/pages/ProfileCollection')),
  },
  {
    path: URLInfo.USER_EDIT,
    title: '프로필 편집',
    exact: true,
    component: lazy(() => import('@src/pages/ProfileEdit')),
  },
  {
    path: URLInfo.PROFILE_USER,
    title: '프로필 유저',
    exact: true,
    component: lazy(() => import('@src/pages/ProfileUser')),
  },
  {
    path: URLInfo.GUIDE,
    title: '사용방법',
    exact: true,
    component: lazy(() => import('@src/pages/Guide')),
  },
  {
    path: URLInfo.GUIDE_DETAIL,
    title: '사용방법 상세',
    exact: true,
    component: lazy(() => import('@src/pages/GuideDetail')),
  },
  {
    path: URLInfo.LOGIN_CALLBACK,
    title: '로그인 callback',
    exact: true,
    component: lazy(() => import('@src/pages/SNSLoginCallback')),
  },
  {
    path: URLInfo.ERROR,
    title: '에러 페이지',
    exact: true,
    component: lazy(() => import('@src/pages/Error')),
  },
  {
    path: URLInfo.RANKING,
    title: '랭킹',
    exact: true,
    component: lazy(() => import('@src/pages/Ranking')),
  }
];
