import { defineComponent as d, useCssVars as f, computed as l, ref as s, createElementBlock as v, openBlock as _, mergeProps as E, createElementVNode as r, normalizeClass as h, renderSlot as b } from "vue";
import { debounce as H, notEmpty as g } from "@milaboratories/helpers";
const T = /* @__PURE__ */ d({
  __name: "LongText",
  setup(k) {
    f((e) => ({
      v5deba9de: c.value
    }));
    const t = s(!1), n = s(), a = s(!1), u = l(() => a.value && t.value ? "ui-lt-animate" : ""), o = H((e) => a.value = e, 500), c = l(() => {
      var e;
      return n.value ? `${((e = n.value) == null ? void 0 : e.innerHTML.length) * 0.4}s` : "5s";
    });
    function i() {
      const e = g(n.value, "span cannot be empty");
      t.value = e.clientWidth < e.scrollWidth;
    }
    function m() {
      i(), o(!0);
    }
    function p() {
      o(!1);
    }
    return (e, y) => (_(), v("div", E(e.$attrs, { class: "ui-lt-container" }), [
      r("span", {
        onMouseover: m,
        onMouseleave: p
      }, [
        r("span", {
          ref_key: "span",
          ref: n,
          class: h(u.value)
        }, [
          b(e.$slots, "default")
        ], 2)
      ], 32)
    ], 16));
  }
});
export {
  T as default
};
//# sourceMappingURL=LongText.vue.js.map
