"use client";
function d(s, f, n) {
  const c = document.getElementById(f), t = document.getElementById(s);
  if (c && t) {
    const l = c.getBoundingClientRect(), e = t.getBoundingClientRect();
    if (t) {
      const o = n, i = t.scrollLeft + t.clientWidth - o, r = l.right - e.x + t.scrollLeft > i, h = t.scrollLeft + o > l.left - e.x + t.scrollLeft;
      r ? t.scrollTo({
        left: l.right - e.x + t.scrollLeft + o - t.clientWidth,
        behavior: "smooth"
      }) : h && t.scrollTo({
        left: l.left - e.x + t.scrollLeft - o,
        behavior: "smooth"
      });
    }
  }
}
export {
  d as scrollHorizontalIntoViewWithOffset
};
//# sourceMappingURL=helpers.mjs.map
