import { defineComponent as u, createElementBlock as r, createCommentVNode as i, openBlock as a, normalizeClass as m, unref as t, createVNode as p, createElementVNode as d, toDisplayString as c } from "vue";
import { cva as f } from "@scalar/components";
import { ScalarIconEnvelopeSimple as v } from "@scalar/icons";
const h = {
  key: 0,
  class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto"
}, b = ["href"], k = { class: "ml-1 empty:hidden" }, E = /* @__PURE__ */ u({
  __name: "Contact",
  props: {
    value: {}
  },
  setup(_) {
    const n = f({
      base: "text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none",
      variants: {
        link: {
          true: "no-underline hover:bg-b-2"
        }
      }
    });
    return (e, g) => {
      var o, l, s;
      return e.value ? (a(), r("div", h, [
        (o = e.value) != null && o.email ? (a(), r("a", {
          key: 0,
          class: m(t(n)({ link: !0 })),
          href: `mailto:${(l = e.value) == null ? void 0 : l.email}`
        }, [
          p(t(v), {
            weight: "bold",
            class: "size-3 text-current"
          }),
          d("span", k, c(e.value.name), 1)
        ], 10, b)) : (s = e.value) != null && s.name ? (a(), r("span", {
          key: 1,
          class: m(t(n)({ link: !1 }))
        }, c(e.value.name), 3)) : i("", !0)
      ])) : i("", !0);
    };
  }
});
export {
  E as default
};
