import { ClickScrollPlugin as e, OverlayScrollbars as t } from "overlayscrollbars";
//#region directives/scrollbar_directive/scrollbar.js
var n = {
	name: "dt-scrollbar-directive",
	install(n) {
		t.plugin(e);
		let r = /* @__PURE__ */ new WeakMap();
		n.directive("dt-scrollbar", {
			mounted(e, n) {
				let i = t({
					target: e,
					elements: { viewport: e.children[0] }
				}, { scrollbars: {
					autoHide: `${n.arg || "leave"}`,
					clickScroll: !0,
					autoHideDelay: `${!n.arg || n.arg === "leave" ? 0 : 1300}`
				} });
				e.setAttribute("data-overlayscrollbars-initialize", !0), e.classList.add("d-scrollbar"), r.set(e, i);
			},
			unmounted(e) {
				r.get(e).destroy();
			}
		});
	}
};
//#endregion
export { n as DtScrollbarDirective, n as default };

//# sourceMappingURL=scrollbar.js.map