bootstrap-vue-next
Version:
Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development
26 lines (25 loc) • 887 B
JavaScript
require("./chunk-CoQrYLCe.js");
const require_keys = require("./keys-durSVUrO.js");
const require_dom = require("./dom-Bs6DzM72.js");
let vue = require("vue");
//#region src/composables/useRtl.ts
var useRtl = () => {
const rtlPlugin = (0, vue.inject)(require_keys.rtlRegistryKey, null);
(0, vue.onMounted)(() => {
(0, vue.watch)(() => rtlPlugin?.locale.value, (newValue) => {
require_dom.getSafeDocument()?.documentElement.setAttribute("lang", newValue ?? "");
}, { immediate: true });
(0, vue.watch)(() => rtlPlugin?.isRtl.value, (newValue) => {
require_dom.getSafeDocument()?.documentElement.setAttribute("dir", newValue ?? false ? "rtl" : "ltr");
}, { immediate: true });
});
return { ...rtlPlugin };
};
//#endregion
Object.defineProperty(exports, "useRtl", {
enumerable: true,
get: function() {
return useRtl;
}
});
//# sourceMappingURL=useRtl-BlPLBmTe.js.map