import { watch as m } from "vue";
function d({ targetIdRef: l, feedContainerId: s, focusClass: n = "focused-message" }) {
  m(
    () => l.value,
    (o) => {
      var c;
      if (!o) return;
      const e = document.getElementById(o), t = document.getElementById(s);
      e instanceof HTMLElement && t instanceof HTMLElement && (t.scrollTop = e.offsetTop + e.clientHeight / 2 - t.clientHeight / 2, (c = e.children[0]) == null || c.classList.add(n), setTimeout(() => {
        var i;
        (i = e.children[0]) == null || i.classList.remove(n);
      }, 2e3));
    }
  );
}
export {
  d as useFeedScrollTo
};
