import { useCallback as e, useRef as t } from "react";
//#region src/features/workbench/hooks/useScrollToListItem.ts
var n = () => {
	let n = t(null);
	return {
		listRef: n,
		scrollTo: e((e) => {
			if (n.current && e) {
				let t = Array.from(n.current.children[0].children).find((t) => t.dataset.id?.endsWith(e));
				if (t) {
					let e = t.getBoundingClientRect().top + window.pageYOffset - 70;
					window.scrollTo({
						top: e,
						behavior: "smooth"
					});
				}
			}
		}, [])
	};
};
//#endregion
export { n as useScrollToListItem };
