import { OpenAPIHono } from "@hono/zod-openapi";
import activequerys from "./route/getCurrentQuerys.js";
import getArticles from "./route/getActiveArticles.js";
import currentInv from "./route/getInventory.js";
import getCustomerInv from "./route/getCustomerInv.js";
import getOpenOrders from "./route/getOpenOrders.js";
import getDeliveryByDate from "./route/getDeliveryDateByRange.js";
import fakeEDI from "./route/fakeEDI.js";
import addressCorrections from "./route/getCityStateData.js";
import fifoIndex from "./route/getFifoIndex.js";
import financeAudit from "./route/getFinanceAudit.js";
import psiArticleData from "./route/getPsiArticleData.js";
import psiPlanningData from "./route/getPsiPlanningData.js";
import psiProductionData from "./route/getPsiProductionData.js";
import psiInventory from "./route/getPsiinventory.js";
import getForecastByAv from "./route/getForecastDataByAv.js";
import getDeliveryByDateRangeAndAv from "./route/getDeliveryDateByRangeAndAv.js";
const app = new OpenAPIHono();

const routes = [
    activequerys,
    getArticles,
    currentInv,
    getCustomerInv,
    getOpenOrders,
    getDeliveryByDate,
    getDeliveryByDateRangeAndAv,
    getForecastByAv,
    fakeEDI,
    addressCorrections,
    fifoIndex,
    financeAudit,
    psiArticleData,
    psiPlanningData,
    psiProductionData,
    psiInventory,
] as const;

const appRoutes = routes.forEach((route) => {
    app.route("/datamart", route);
});

export default app;
