import { h } from './chunks/d4789960.js';
import './chunks/456564be.js';
import { u as useProp } from './chunks/c26036df.js';
import './chunks/4ccc6eeb.js';
import { g as getComponentOrDefine } from './chunks/071ed725.js';
import './chunks/23e44913.js';
import { O as Option } from './chunks/a02c5734.js';
import './chunks/d76d6172.js';
import './kun-icon.js';
import './chunks/cd857e99.js';
import './kun-image-or-default.js';
import './chunks/e5702756.js';
import './kun-image.js';
import { g as getKunImageUrl } from './chunks/8c68f334.js';

var style = ":host {\n}\n";

const KunRichMsg = () => {
  const [msgProps] = useProp("message");
  const msg = Option.of(msgProps).getOrElse({
    msgContent: "7/KzoMb8EeqCHJ3T8JKVww==.png",
    msgType: "IMAGE"
  });
  return h("host", null, h("style", null, style), h("span", null, msg.msgType === "TXT" && h("div", {
    class: "break-all"
  }, msg.msgContent), msg.msgType === "TEXT" && h("div", {
    class: "break-all"
  }, msg.msgContent), msg.msgType === "IMAGE" && h("sl-gallery", {
    prefix: msg.msgId
  }, h("sl-gallery-image", {
    src: getKunImageUrl(msg.msgContent),
    small: getKunImageUrl(msg.msgContent),
    title: "\u56FE\u7247"
  }))));
};

KunRichMsg.props = {
  message: {
    type: Object
  }
};
var kunRichMsg = getComponentOrDefine("kun-rich-msg", KunRichMsg);

export default kunRichMsg;
//# sourceMappingURL=kun-rich-msg.js.map
