import { t as e } from "../../utils-C_mWfcFX.js";
//#region src/primitives/scroll-area/index.ts
var t = class {
	el;
	viewportEl;
	constructor(t) {
		let n = t.orientation ?? "vertical";
		this.el = document.createElement("div"), this.el.className = "cmm-scroll-area", t.className && this.el.classList.add(t.className), this.viewportEl = document.createElement("div"), this.viewportEl.className = `cmm-scroll-area__viewport cmm-scroll-area__viewport--${n}`, t.maxHeight !== void 0 && (this.viewportEl.style.maxHeight = t.maxHeight), this.el.appendChild(this.viewportEl), t.container !== void 0 && e(t.container).appendChild(this.el);
	}
	getViewport() {
		return this.viewportEl;
	}
	scrollTo(e, t) {
		this.viewportEl.scrollTop = e, t !== void 0 && (this.viewportEl.scrollLeft = t);
	}
	scrollToTop() {
		this.viewportEl.scrollTop = 0;
	}
	scrollToBottom() {
		this.viewportEl.scrollTop = this.viewportEl.scrollHeight;
	}
	destroy() {
		this.el.remove();
	}
};
//#endregion
export { t as ScrollArea };

//# sourceMappingURL=index.js.map