import { defineComponent as u, ref as c, createElementBlock as n, openBlock as i, Fragment as g, withDirectives as _, createElementVNode as s, vShow as y, createCommentVNode as l, toDisplayString as f, unref as o } from "vue";
import { useMessageLinks as k } from "../../../hooks/messages/useMessageLinks.js";
import "../../../functions/parseMarkdown.js";
const v = { class: "audio-message__play" }, x = { class: "audio-message__text-container" }, h = { key: 0 }, w = ["innerHTML"], N = /* @__PURE__ */ u({
  __name: "ReplyAudioMessage",
  props: {
    message: {
      type: Object,
      required: !0
    }
  },
  setup(t) {
    const r = t, m = c(!1), { linkedHtml: d, inNewWindow: a } = k(() => r.message.text);
    return (M, e) => (i(), n(g, null, [
      _(s("div", v, [...e[1] || (e[1] = [
        s("span", { class: "pi pi-play" }, null, -1)
      ])], 512), [
        [y, !m.value]
      ]),
      s("div", x, [
        t.message.header ? (i(), n("p", h, f(t.message.header), 1)) : l("", !0),
        e[2] || (e[2] = s("div", { class: "audio-message__reply-description" }, [
          s("span", { class: "pi pi-microphone" }),
          s("p", null, "Аудиосообщение")
        ], -1)),
        t.message.text ? (i(), n("p", {
          key: 1,
          class: "audio-message__text",
          onClick: e[0] || (e[0] = //@ts-ignore
          (...p) => o(a) && o(a)(...p)),
          innerHTML: o(d)
        }, null, 8, w)) : l("", !0)
      ])
    ], 64));
  }
});
export {
  N as default
};
