import { defineComponent as m, computed as t, createElementBlock as r, createCommentVNode as a, openBlock as o, createElementVNode as f, toDisplayString as u } from "vue";
import { useI18n as _ } from "vue-i18n";
import { b as c } from "./link-value.json_vue_type_i18n_index_0_src_true_lang-Dr1AN4WJ.js";
const h = { key: 0 }, k = ["href"], v = { key: 0 }, V = /* @__PURE__ */ m({
  __name: "ChannelsDataTypeLinkValueRenderer",
  props: {
    row: {},
    rowIndex: {},
    cell: {},
    cellValue: {},
    dataTypeInstance: {},
    modelValue: {}
  },
  setup(s) {
    const { t: i } = _(), e = s, p = t(() => !Array.isArray(e.cellValue) || !e.cellValue.length), n = t(() => e.cellValue?.[0] ?? ""), d = t(() => n.value ? n.value.length > 30 ? n.value.substring(0, 27) + "..." : n.value : ""), l = t(() => !e.cellValue || e.cellValue.length <= 1 ? "" : i("channels-ui.link-value.more_links", [e.cellValue.length - 1]));
    return (y, g) => p.value ? a("", !0) : (o(), r("div", h, [
      f("a", {
        href: n.value,
        target: "_blank",
        rel: "noreferrer noopener"
      }, u(d.value), 9, k),
      l.value ? (o(), r("span", v, u(l.value), 1)) : a("", !0)
    ]));
  }
});
typeof c == "function" && c(V);
export {
  V as default
};
