import { runParallel } from "./chokidar/dist/esm/utils/runParallel/index.mjs";
import { watch$1 } from "./chokidar/dist/esm/watcher.mjs";
import { getAppLogger, getConfiguration } from "@intlayer/config";

//#region ../@intlayer/cli/dist/esm/watch.mjs
/**
* Get locales dictionaries .content.{json|ts|tsx|js|jsx|mjs|cjs} and build the JSON dictionaries in the .intlayer directory.
* Watch mode available to get the change in the .content.{json|ts|tsx|js|jsx|mjs|cjs}
*/
const watchContentDeclaration = async (options) => {
	const appLogger = getAppLogger(getConfiguration(options?.configOptions));
	if (options?.with) runParallel(options.with).result.catch(() => {});
	appLogger("Watching Intlayer content declarations");
	watch$1({
		persistent: true,
		skipPrepare: options?.skipPrepare ?? false
	});
};

//#endregion
export { watchContentDeclaration };
//# sourceMappingURL=watch.mjs.map