import { defineComponent, useCssVars, unref, ref, computed, openBlock, createBlock, normalizeClass } from "vue";
import { TextEllipsis } from "vant";
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
var _export_sfc = (sfc, props) => {
  const target = sfc.__vccOpts || sfc;
  for (const [key, val] of props) {
    target[key] = val;
  }
  return target;
};
const __default__ = {
  name: "WlTextEllipsis"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    content: { default: "" },
    rows: { default: 1 },
    fontSize: { default: 14 },
    linearColor: { default: "#fff" }
  },
  setup(__props) {
    const props = __props;
    useCssVars((_ctx) => ({
      "3b57deaf": unref(expandTextSize),
      "2fdc04d8": unref(expandTextWidth),
      "80222512": __props.linearColor
    }));
    const textEllipsisRef = ref();
    const ellipsisStatus = ref(false);
    const textEllipsisClass = computed(() => ellipsisStatus.value ? "" : "my-text-ellipsis");
    const expandTextWidth = computed(() => props.fontSize * 2 + "px");
    const expandTextSize = computed(() => props.fontSize + "px");
    const onClickAction = () => {
      ellipsisStatus.value = !ellipsisStatus.value;
    };
    return (_ctx, _cache) => {
      return openBlock(), createBlock(unref(TextEllipsis), {
        ref_key: "textEllipsisRef",
        ref: textEllipsisRef,
        class: normalizeClass(`my-text ${unref(textEllipsisClass)}`),
        content: __props.content,
        rows: __props.rows,
        dots: "",
        "expand-text": "\u5C55\u5F00",
        "collapse-text": "\u6536\u8D77",
        onClickAction
      }, null, 8, ["class", "content", "rows"]);
    };
  }
});
var Comp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fe56510e"]]);
var __uno = "";
Comp.install = (app) => {
  app.component(Comp.name, Comp);
};
export { Comp as default };
