import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/home.vue'
import RecipeDetail from '@/views/recipeDetail.vue'
import WeekRecipe from '@/views/weekRecipe.vue'
import DailyRecipeDetail from '@/views/dailyRecipeDetail.vue'
import RecipeMobileHome from '@/views/recipe-mobile/Home.vue'
import RecipeMobileRecipeCreate from '@/views/recipe-mobile/RecipeCreate.vue'
import RecipeMobileWeekRecipe from '@/views/recipe-mobile/WeekRecipe.vue'
import RecipeMobileRecipeDetail from '@/views/recipe-mobile/RecipeDetail.vue'
import RecipeMobileDailyRecipeDetail from '@/views/recipe-mobile/DailyRecipeDetail.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
  },
  {
    path: '/recipe/:id',
    name: "RecipeDetail",
    component: RecipeDetail
  },
  {
    path: '/week-recipe/',
    name: "WeekRecipe",
    component: WeekRecipe
  },
  {
    path: '/daily-recipe/:id',
    name: "DailyRecipeDetail",
    component: DailyRecipeDetail
  },

  // mobile recipe
  {
    path: '/recipe-mobile/',
    name: "RecipeMobileHome",
    component: RecipeMobileHome
  },
  {
    path: '/recipe-mobile/recipe/create/',
    name: "RecipeMobileRecipeCreate",
    component: RecipeMobileRecipeCreate
  },
  {
    path: '/recipe-mobile/week-recipe/',
    name: "RecipeMobileWeekRecipe",
    component: RecipeMobileWeekRecipe
  },
  {
    path: '/recipe-mobile/recipe/:id',
    name: "RecipeMobileRecipeDetail",
    component: RecipeMobileRecipeDetail
  },
  {
    path: '/recipe-mobile/daily-recipe/:id',
    name: "RecipeMobileDailyRecipeDetail",
    component: RecipeMobileDailyRecipeDetail
  },
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;
