import { defineComponent as p, computed as n, createElementBlock as u, createCommentVNode as d, openBlock as h, createElementVNode as _, toDisplayString as f, unref as v } from "vue";
import { useLocale as g } from "../../../locale/useLocale.js";
const x = ["data-channel-type"], y = { class: "message-sms-invite__text" }, w = /* @__PURE__ */ p({
  __name: "MessageSmsInvite",
  props: {
    status: {},
    hasMessengerAccount: { type: Boolean },
    channel: {}
  },
  emits: ["sms-invite"],
  setup(a, { emit: o }) {
    const t = a, c = o, { t: i } = g(), r = n(() => t.status === "error" && t.hasMessengerAccount === !1), m = n(() => {
      var s;
      const e = ((s = t.channel) == null ? void 0 : s.toLowerCase()) ?? "";
      return e.includes("whatsapp") || e.includes("waba") ? "whatsapp" : e.includes("max") ? "max" : "telegram";
    }), l = () => {
      c("sms-invite");
    };
    return (e, s) => r.value ? (h(), u("div", {
      key: 0,
      class: "message-sms-invite",
      "data-channel-type": m.value,
      onClick: l
    }, [
      _("span", y, f(v(i)("component.TextMessage.sendSmsInvite")), 1)
    ], 8, x)) : d("", !0);
  }
});
export {
  w as default
};
