import { __require as e } from "../../_virtual/_rolldown/runtime.mjs";
import { isNode as t } from "../../constants/vite.constants.mjs";
import "../../constants/index.mjs";
import { FileCacheDevice as n } from "../../data-structures/cacheDevices/FileCacheDevice.mjs";
import { LocalStorageCacheDevice as r } from "../../data-structures/cacheDevices/LocalStorageCacheDevice.mjs";
import "../../data-structures/cacheDevices/index.mjs";
//#region libs/shared/common/src/functions/utils/cacheDevice.utils.ts
var i = (i) => {
	if (t) {
		let t, r;
		i && ({useFileCache: t, cacheFilePath: r} = i);
		let a = e("path").resolve(process.cwd(), "hinkalCache.json");
		return new n(t, r ?? a);
	} else return new r(i?.disableCaching, i?.serializedCache);
};
//#endregion
export { i as createCacheDevice };
