import { defineComponent, openBlock, createElementBlock, Fragment, renderList, toDisplayString, createCommentVNode } from "vue";
import { decodeMessageText } from "../util.mjs";
const _hoisted_1 = {
  key: 0,
  class: "text-box"
};
const _hoisted_2 = ["src"];
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "MessageText",
  props: ["data"],
  setup(__props) {
    const props = __props;
    const handleTextMessageShowContext = (text) => decodeMessageText(text);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("span", null, [
        (openBlock(true), createElementBlock(Fragment, null, renderList(handleTextMessageShowContext(props.data), (item, index) => {
          return openBlock(), createElementBlock("span", { key: index }, [
            item.name === "text" ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(item.text), 1)) : item.name === "img" ? (openBlock(), createElementBlock("img", {
              key: 1,
              class: "text-img",
              src: item.src
            }, null, 8, _hoisted_2)) : createCommentVNode("", true)
          ]);
        }), 128))
      ]);
    };
  }
});
export {
  _sfc_main as default
};
