import { dirname, join } from "node:path";
import { existsSync } from "node:fs";
import { readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import { getPackageJsonPath, getProjectRequire } from "@intlayer/config";

//#region src/generated/legal.entry.ts
const currentDir = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
let baseDir;
try {
	baseDir = getPackageJsonPath(getProjectRequire(currentDir).resolve("@intlayer/docs")).baseDir;
} catch {
	try {
		baseDir = getPackageJsonPath(getProjectRequire().resolve("@intlayer/docs")).baseDir;
	} catch {
		baseDir = getPackageJsonPath(currentDir).baseDir;
	}
}
const readLocale = (relativeAfterLocale, locale) => {
	const target1 = join(baseDir, `./legal/${locale}/${relativeAfterLocale}`);
	if (existsSync(target1)) return readFile(target1, "utf8");
	const target2 = join(baseDir, `./legal/en/${relativeAfterLocale}`);
	if (existsSync(target2)) return readFile(target2, "utf8");
	return Promise.reject(/* @__PURE__ */ new Error(`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`));
};
const legalEntry = {
	"./legal/en/privacy_notice.md": {
		en: readLocale("privacy_notice.md", "en"),
		ru: readLocale("privacy_notice.md", "ru"),
		ja: readLocale("privacy_notice.md", "ja"),
		fr: readLocale("privacy_notice.md", "fr"),
		ko: readLocale("privacy_notice.md", "ko"),
		zh: readLocale("privacy_notice.md", "zh"),
		es: readLocale("privacy_notice.md", "es"),
		de: readLocale("privacy_notice.md", "de"),
		ar: readLocale("privacy_notice.md", "ar"),
		it: readLocale("privacy_notice.md", "it"),
		"en-GB": readLocale("privacy_notice.md", "en-GB"),
		pt: readLocale("privacy_notice.md", "pt"),
		hi: readLocale("privacy_notice.md", "hi"),
		tr: readLocale("privacy_notice.md", "tr"),
		pl: readLocale("privacy_notice.md", "pl"),
		id: readLocale("privacy_notice.md", "id"),
		vi: readLocale("privacy_notice.md", "vi")
	},
	"./legal/en/terms_of_service.md": {
		en: readLocale("terms_of_service.md", "en"),
		ru: readLocale("terms_of_service.md", "ru"),
		ja: readLocale("terms_of_service.md", "ja"),
		fr: readLocale("terms_of_service.md", "fr"),
		ko: readLocale("terms_of_service.md", "ko"),
		zh: readLocale("terms_of_service.md", "zh"),
		es: readLocale("terms_of_service.md", "es"),
		de: readLocale("terms_of_service.md", "de"),
		ar: readLocale("terms_of_service.md", "ar"),
		it: readLocale("terms_of_service.md", "it"),
		"en-GB": readLocale("terms_of_service.md", "en-GB"),
		pt: readLocale("terms_of_service.md", "pt"),
		hi: readLocale("terms_of_service.md", "hi"),
		tr: readLocale("terms_of_service.md", "tr"),
		pl: readLocale("terms_of_service.md", "pl"),
		id: readLocale("terms_of_service.md", "id"),
		vi: readLocale("terms_of_service.md", "vi")
	}
};

//#endregion
export { legalEntry };
//# sourceMappingURL=legal.entry.mjs.map