import { defineComponent as k, createElementBlock as s, openBlock as l, Fragment as m, renderList as y, createElementVNode as n, normalizeClass as b, toDisplayString as d } from "vue";
const h = { class: "quick-reply-buttons" }, f = ["onClick"], g = { class: "quick-reply-buttons__line" }, v = /* @__PURE__ */ k({
  __name: "WABAQuickReplyButtons",
  props: {
    buttons: {
      type: Array,
      default: []
    }
  },
  emits: ["selectAllVariants"],
  setup(t, { emit: c }) {
    const u = c, a = t, p = {
      URL: "pi-arrow-up-right",
      PHONE_NUMBER: "pi-phone",
      QUICK_REPLY: "pi-arrow-up-left"
    }, _ = (o) => {
      o == 2 && a.buttons.length > 3 && u("selectAllVariants");
    };
    return (o, i) => (l(), s("div", h, [
      (l(!0), s(m, null, y(t.buttons.slice(0, 3), (r, e) => (l(), s("div", {
        key: e,
        class: "quick-reply-buttons__preview-action",
        onClick: (C) => _(e)
      }, [
        i[0] || (i[0] = n("hr", { class: "quick-reply-buttons__separator" }, null, -1)),
        n("div", g, [
          n("span", {
            class: b(["quick-reply-buttons__icon pi pi-arrow-up-left", e == 2 && t.buttons.length > 3 ? "pi-list" : p[r.type]])
          }, null, 2),
          n("p", null, d(e == 2 && t.buttons.length > 3 ? "Смотреть все варианты" : r.text), 1)
        ])
      ], 8, f))), 128))
    ]));
  }
});
export {
  v as default
};
