import { defineComponent as p, computed as f, createElementBlock as t, openBlock as n, normalizeClass as m, Fragment as y, renderList as u, normalizeStyle as _, createElementVNode as h, toDisplayString as x } from "vue";
const k = ["onClick"], w = /* @__PURE__ */ p({
  __name: "FeedKeyboard",
  props: {
    buttons: {
      type: Array,
      required: !0,
      default: () => []
    },
    align: {
      type: String,
      default: "right",
      validator: (r) => ["left", "center", "right"].includes(r)
    }
  },
  emits: ["action"],
  setup(r, { emit: i }) {
    const l = r, c = i, s = f(() => [...l.buttons].sort((o, a) => o.order - a.order)), d = (o) => {
      typeof o.action == "function" ? o.action() : o.action != null && c("action", o.action);
    };
    return (o, a) => (n(), t("div", {
      class: m(["feed-keyboard__container", [
        `feed-keyboard__container--${r.align}`
      ]])
    }, [
      (n(!0), t(y, null, u(s.value, (e) => (n(), t("div", {
        key: e.key,
        class: "feed-keyboard__button",
        style: _({
          "box-shadow": e["shadow-color"] && e["shadow-color"] !== "none" ? `0px 4px 4px ${e["shadow-color"]}, 0px 1px 2px ${e["shadow-color"]}` : "none",
          color: e["text-color"] || "inherit"
        }),
        onClick: (g) => d(e)
      }, [
        h("p", null, x(e.text), 1)
      ], 12, k))), 128))
    ], 2));
  }
});
export {
  w as default
};
