import { defineComponent as m, computed as i, createBlock as s, createCommentVNode as l, openBlock as a, withCtx as c, createElementVNode as d, normalizeClass as g, unref as r } from "vue";
import p from "../../1_atoms/Tooltip/Tooltip.vue.js";
import { statuses as S } from "../../../functions/getStatusMessage.js";
import "../../../functions/parseMarkdown.js";
import f from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
import y from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
import C from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
import k from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
import I from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
const M = /* @__PURE__ */ m({
  name: "MessageStatusIndicator",
  __name: "MessageStatusIndicator",
  props: {
    baseClass: {
      type: String,
      required: !0
    },
    messageStatus: {
      type: String,
      required: !0
    },
    statusClass: {
      type: String,
      default: ""
    },
    statusTitle: {
      type: String,
      default: ""
    },
    messageClass: {
      type: String,
      required: !0
    },
    tooltipPosition: {
      type: String,
      default: "bottom-left"
    },
    statuses: {
      type: Array,
      default: () => S
    }
  },
  setup(t) {
    const e = t, u = i(() => e.messageClass === `${e.baseClass}__right` && e.statuses.includes(e.messageStatus)), n = i(() => {
      const o = [`${e.baseClass}__status`];
      return e.statusClass && o.push(e.statusClass), o;
    });
    return (o, b) => u.value ? (a(), s(p, {
      key: 0,
      text: t.statusTitle,
      position: t.tooltipPosition
    }, {
      default: c(() => [
        d("div", {
          class: g(["message-status-indicator", ...n.value])
        }, [
          t.messageStatus === "pending" ? (a(), s(r(y), { key: 0 })) : t.messageStatus === "error" ? (a(), s(r(f), { key: 1 })) : t.messageStatus === "read" ? (a(), s(r(C), { key: 2 })) : t.messageStatus === "received" ? (a(), s(r(k), { key: 3 })) : (a(), s(r(I), { key: 4 }))
        ], 2)
      ]),
      _: 1
    }, 8, ["text", "position"])) : l("", !0);
  }
});
export {
  M as default
};
