import { IModuleServer, ModuleParams } from "@/core";
import { logger } from "@/core/logger";
import { invoicesRouter, models } from "../../../../../modules/invoices/src/api/intrastructure";

export const invoicesModule: IModuleServer = {
  metadata: {
    name: "invoices",
    version: "1.0.0",
    dependencies: [],
  },
  init(params: ModuleParams) {
    // const contacts = getService<ContactsService>("contacts");
    invoicesRouter(params);
    logger.info({ message: "🚀 Invoices module initialized", label: "invoices" });
  },
  registerDependencies(params) {
    const { database } = params;
    logger.info({ message: "🚀 Invoices module dependencies registered", label: "invoices" });
    return {
      models,
      services: {
        getInvoice: () => {},
        /*...*/
      },
    };
  },
};
