import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, normalizeStyle, createBlock, withCtx, resolveDynamicComponent, renderSlot, toDisplayString } from "vue";
import { ElIcon as m } from "../../icon/index.mjs";
import { timelineItemProps as l } from "./timeline-item.mjs";
import c from "../../../_virtual/plugin-vue_export-helper.mjs";
import { useNamespace as q } from "../../../hooks/use-namespace/index.mjs";
const I = defineComponent({
  name: "ElTimelineItem"
}), N = /* @__PURE__ */ defineComponent({
  ...I,
  props: l,
  setup(f) {
    const n = f, e = q("timeline-item"), u = computed(() => [
      e.e("node"),
      e.em("node", n.size || ""),
      e.em("node", n.type || ""),
      e.is("hollow", n.hollow)
    ]);
    return (o, T) => (openBlock(), createElementBlock("li", {
      class: normalizeClass([unref(e).b(), { [unref(e).e("center")]: o.center }])
    }, [
      createElementVNode("div", {
        class: normalizeClass(unref(e).e("tail"))
      }, null, 2),
      o.$slots.dot ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock("div", {
        key: 0,
        class: normalizeClass(unref(u)),
        style: normalizeStyle({
          backgroundColor: o.color
        })
      }, [
        o.icon ? (openBlock(), createBlock(unref(m), {
          key: 0,
          class: normalizeClass(unref(e).e("icon"))
        }, {
          default: withCtx(() => [
            (openBlock(), createBlock(resolveDynamicComponent(o.icon)))
          ]),
          _: 1
        }, 8, ["class"])) : createCommentVNode("v-if", true)
      ], 6)),
      o.$slots.dot ? (openBlock(), createElementBlock("div", {
        key: 1,
        class: normalizeClass(unref(e).e("dot"))
      }, [
        renderSlot(o.$slots, "dot")
      ], 2)) : createCommentVNode("v-if", true),
      createElementVNode("div", {
        class: normalizeClass(unref(e).e("wrapper"))
      }, [
        !o.hideTimestamp && o.placement === "top" ? (openBlock(), createElementBlock("div", {
          key: 0,
          class: normalizeClass([unref(e).e("timestamp"), unref(e).is("top")])
        }, toDisplayString(o.timestamp), 3)) : createCommentVNode("v-if", true),
        createElementVNode("div", {
          class: normalizeClass(unref(e).e("content"))
        }, [
          renderSlot(o.$slots, "default")
        ], 2),
        !o.hideTimestamp && o.placement === "bottom" ? (openBlock(), createElementBlock("div", {
          key: 1,
          class: normalizeClass([unref(e).e("timestamp"), unref(e).is("bottom")])
        }, toDisplayString(o.timestamp), 3)) : createCommentVNode("v-if", true)
      ], 2)
    ], 2));
  }
});
var D = /* @__PURE__ */ c(N, [["__file", "timeline-item.vue"]]);
export {
  D as default
};
