"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;
