import { list, pack } from "@/modules";
import { createCtxCreator } from "queenjs/framework";
import { vue_adapter } from "queenjs/framework/adapter/vue";

const modules = {
  pack,
  list,
};

export const websiteCtx = createCtxCreator(modules, {
  adapter: { vue_adapter },
});

export const useCtx = websiteCtx.use;

websiteCtx.setConfig({
  list: {
    httpConfig: {
      baseURL:
        process.env.NODE_ENV === "production"
          ? "http://127.0.0.1:7777/museum"
          : "http://127.0.0.1:7777/museum",
    },
  },
});
