"use strict";
const vue = require("vue");
const keys = require("./keys-D70E9HED.js");
const useRtl = () => {
  const rtlPlugin = vue.inject(keys.rtlRegistryKey, null);
  vue.onMounted(() => {
    vue.watch(
      () => rtlPlugin?.locale.value,
      (newValue) => {
        const html = document.documentElement;
        html.setAttribute("lang", newValue ?? "");
      },
      { immediate: true }
    );
    vue.watch(
      () => rtlPlugin?.isRtl.value,
      (newValue) => {
        const html = document.documentElement;
        html.setAttribute("dir", newValue ?? false ? "rtl" : "ltr");
      },
      { immediate: true }
    );
  });
  return { ...rtlPlugin };
};
exports.useRtl = useRtl;
//# sourceMappingURL=useRtl-Cdq3VbsD.js.map
