import { E as e, q as t } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
import { T as n } from "./keys-BeW4IrXP.js";
//#region src/composables/useI18n.ts
function r(r) {
	let i = r ?? e(n, null);
	if (!i) throw Error("useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.");
	let a = t(i) ? i.value : i;
	function o(e, t) {
		return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
	}
	return {
		t: a,
		format: o
	};
}
//#endregion
export { r as t };
