const { getAllRecipe, addRecipe, getAllMeterialRecipe, updateRecipe, deleteRecipe, 
    fetchAllJobCostByProjectIdRecipe, getAllServiceRecipe, duplicateRecipe, updateJobCostAuto, 
    fetchRecipeHistoryById,fetchAllDesignOrderJobCostByDesignOrderIdRecipe, 
    saveRecipeAsCopy, markRecipeViewed} = require("../controllers/recipe");
const { deleteSplitEstimate, updateSplitEstimate, updateProductAddedStatus, convertSplitEstimateToEstimate } = require("../controllers/SplitEstimate");
const { updateJobCost } = require("../models/jobCost");

const recipeRoutes = [{
    method : "POST",
    url : "/webservice/product/get-all-recipes",
    handler : getAllRecipe
},
{
    method : "POST",
    url : "/webservice/recipe/add-recipe",
    handler : addRecipe
},
{
    method : "POST",
    url : "/webservice/recipe/duplicate-recipe",
    handler : duplicateRecipe
},
{
  method: "POST",
  url: "/webservice/recipe/save-recipe-as-copy",
  handler: saveRecipeAsCopy,
},
{
    method : "POST",
    url : "/webservice/recipe/get-all-materials",
    handler : getAllMeterialRecipe
},
{
    method : "POST",
    url : "/webservice/recipe/get-all-services",
    handler : getAllServiceRecipe
},
{
    method : "POST",
    url : "/webservice/recipe/update-recipe",
    handler : updateRecipe
},
{
    method : "POST",
    url : "/webservice/recipe/mark-viewed",
    handler : markRecipeViewed
},
{
    method : "POST",
    url : "/webservice/recipe/update-job-cost-automatically",
    handler : updateJobCostAuto
},
{
    method : "POST",
    url : "/webservice/recipe/delete-recipe",
    handler :deleteRecipe
},
{
    method : "POST",
    url : "/webservice/project/fetch-all-job-cost-recipe",
    handler : fetchAllJobCostByProjectIdRecipe
},
{
    method : "POST",
    url : "/webservice/recipe/fetch-recipe-history-by-id",
    handler : fetchRecipeHistoryById
},
{
    method : "POST",
    url : "/webservice/project/fetch-all-design-order-job-cost-recipe",
    handler : fetchAllDesignOrderJobCostByDesignOrderIdRecipe
},
{
    method : "POST",
    url : "/webservice/request/delete-split-estimate",
    handler : deleteSplitEstimate
},
{
    method : "POST",
    url : "/webservice/request/update-split-estimate",
    handler : updateSplitEstimate
},
{
    method : "POST",
    url : "/webservice/request/convert-split-estimate-to-estimate",
    handler : convertSplitEstimateToEstimate
},
{
    method : "POST",
    url : "/webservice/split-estimate/update-product-added-status",
    handler : updateProductAddedStatus
},
];
module.exports =recipeRoutes ;