import { ref as u, unref as m } from "vue";
function g({ feedRef: f, keyboardRef: c, onButtonShow: t, onKeyboardPlace: i }) {
  const l = u(!1), s = u(!1);
  return {
    isShowButton: l,
    isKeyboardPlace: s,
    checkButtonVisibility: () => {
      const e = m(f);
      if (!e) return;
      let r = 0;
      c.value && (r = c.value.refKeyboard.clientHeight), e.scrollHeight - e.scrollTop - e.clientHeight < 100 + r ? (l.value = !1, s.value = !0, i == null || i()) : (l.value = !0, s.value = !1, t == null || t());
    }
  };
}
export {
  g as useFeedButton
};
