import { defineComponent as f, createElementBlock as n, openBlock as l, Fragment as c, createElementVNode as s, createCommentVNode as o, toDisplayString as r, unref as a } from "vue";
import { useMessageLinks as u } from "../../../hooks/messages/useMessageLinks.js";
import "../../../functions/parseMarkdown.js";
const k = ["href"], _ = { key: 0 }, h = ["href"], p = { class: "file-message__filename-text" }, x = ["innerHTML"], C = /* @__PURE__ */ f({
  __name: "ReplyFileMessage",
  props: {
    message: {
      type: Object,
      required: !0
    }
  },
  setup(e) {
    const m = e, { linkedHtml: d, inNewWindow: i } = u(() => m.message.text);
    return (y, t) => (l(), n(c, null, [
      s("a", {
        class: "file-message__link",
        href: e.message.url,
        download: "",
        target: "_blank"
      }, [...t[1] || (t[1] = [
        s("span", { class: "pi pi-file" }, null, -1)
      ])], 8, k),
      s("div", null, [
        e.message.header ? (l(), n("p", _, r(e.message.header), 1)) : o("", !0),
        s("a", {
          class: "file-message__link",
          href: e.message.url,
          download: "",
          target: "_blank"
        }, [
          s("p", p, r(e.message.filename), 1)
        ], 8, h),
        e.message.text ? (l(), n("p", {
          key: 1,
          class: "file-message__text",
          onClick: t[0] || (t[0] = //@ts-ignore
          (...g) => a(i) && a(i)(...g)),
          innerHTML: a(d)
        }, null, 8, x)) : o("", !0)
      ])
    ], 64));
  }
});
export {
  C as default
};
