"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("../../../hooks/use-namespace/index.js");
const index$1 = require("../../icon/index.js");
const tokens = require("./tokens.js");
const timelineItem = require("./timeline-item.js");
const Vue = require("vue");
var timeline_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ Vue.defineComponent({
  name: "ElTimelineItem",
  __name: "timeline-item",
  props: timelineItem.timelineItemProps,
  setup(__props) {
    const props = __props;
    const { props: timelineProps } = Vue.inject(tokens.TIMELINE_INJECTION_KEY);
    const ns = index.useNamespace("timeline-item");
    const defaultNodeKls = Vue.computed(() => [
      ns.e("node"),
      ns.em("node", props.size || ""),
      ns.em("node", props.type || ""),
      ns.is("hollow", props.hollow)
    ]);
    const timelineItemKls = Vue.computed(() => [
      ns.b(),
      { [ns.e("center")]: props.center },
      ns.is(timelineProps.mode)
    ]);
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("li", { class: Vue.normalizeClass(timelineItemKls.value) }, [
        Vue.createElementVNode("div", { class: Vue.normalizeClass(Vue.unref(ns).e("tail")) }, null, 2),
        !_ctx.$slots.dot ? (Vue.openBlock(), Vue.createElementBlock("div", {
          key: 0,
          class: Vue.normalizeClass(defaultNodeKls.value),
          style: Vue.normalizeStyle({ backgroundColor: __props.color })
        }, [__props.icon ? (Vue.openBlock(), Vue.createBlock(Vue.unref(index$1.ElIcon), {
          key: 0,
          class: Vue.normalizeClass(Vue.unref(ns).e("icon"))
        }, {
          default: Vue.withCtx(() => [(Vue.openBlock(), Vue.createBlock(Vue.resolveDynamicComponent(__props.icon)))]),
          _: 1
        }, 8, ["class"])) : Vue.createCommentVNode("v-if", true)], 6)) : Vue.createCommentVNode("v-if", true),
        _ctx.$slots.dot ? (Vue.openBlock(), Vue.createElementBlock("div", {
          key: 1,
          class: Vue.normalizeClass(Vue.unref(ns).e("dot"))
        }, [Vue.renderSlot(_ctx.$slots, "dot")], 2)) : Vue.createCommentVNode("v-if", true),
        Vue.createElementVNode("div", { class: Vue.normalizeClass(Vue.unref(ns).e("wrapper")) }, [
          !__props.hideTimestamp && __props.placement === "top" ? (Vue.openBlock(), Vue.createElementBlock("div", {
            key: 0,
            class: Vue.normalizeClass([Vue.unref(ns).e("timestamp"), Vue.unref(ns).is("top")])
          }, Vue.toDisplayString(__props.timestamp), 3)) : Vue.createCommentVNode("v-if", true),
          Vue.createElementVNode("div", { class: Vue.normalizeClass(Vue.unref(ns).e("content")) }, [Vue.renderSlot(_ctx.$slots, "default")], 2),
          !__props.hideTimestamp && __props.placement === "bottom" ? (Vue.openBlock(), Vue.createElementBlock("div", {
            key: 1,
            class: Vue.normalizeClass([Vue.unref(ns).e("timestamp"), Vue.unref(ns).is("bottom")])
          }, Vue.toDisplayString(__props.timestamp), 3)) : Vue.createCommentVNode("v-if", true)
        ], 2)
      ], 2);
    };
  }
});
exports.default = timeline_item_vue_vue_type_script_setup_true_lang_default;
