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