import { NEW_PROJECT_PAGE, PROJECTS_PAGE } from '@/router/portfolio.names';
import flavorValues from '@/helpers/app-flavor';

const portfolio = () => import(/* webpackChunkName: "portfolio" */ '@/pages/portfolio/portfolio');
const project = () => import(/* webpackChunkName: "portfolio" */ '@/pages/portfolio/project');
const newProject = () => import(/* webpackChunkName: "portfolio" */ '@/pages/portfolio/newProject');
const editProject = () => import(/* webpackChunkName: "portfolio" */ '@/pages/portfolio/editProject');

const portfolioRoutes = [
  { path: '/portfolio', name: PROJECTS_PAGE, component: portfolio, meta: { hideFooter: true } },
  { path: '/portfolio/:slug', name: 'project', component: project, props: true },
  { path: '/new-project/', name: NEW_PROJECT_PAGE, component: newProject },
  { path: '/edit-project/:slug', name: 'edit-project', component: editProject, props: true },
];

const routes = flavorValues.showPortfolio ? portfolioRoutes : [];

export default routes;
