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";

const app = new OpenAPIHono();

const routes = [
    activequerys,
    getArticles,
    currentInv,
    getCustomerInv,
    getOpenOrders,
    getDeliveryByDate,
    fakeEDI,
    addressCorrections,
    fifoIndex,
    financeAudit,
    psiArticleData,
] as const;

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

export default app;
