import { initDicts } from "@/utils/init.js";

const modules = require.context("./add/", true, /column.js$/);
const columns = [];
modules.keys().forEach((fileName) => {
  const data = modules(fileName).default();
  for (const key in data) {
    if (key === "TabColumns") {
      columns.push(...data[key].map((item) => item.TableColumns).flat());
    } else {
      columns.push(...data[key]);
    }
  }
});
export const dicts = initDicts(columns);