"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const runtime = require("../../../utils/vue/props/runtime.js");
const vnode = require("../../../utils/vue/vnode.js");
const index = require("../../../hooks/use-namespace/index.js");
const tokens = require("./tokens.js");
const vue = require("vue");
const timelineProps = runtime.buildProps({
  mode: {
    type: String,
    values: [
      "start",
      "alternate",
      "alternate-reverse",
      "end"
    ],
    default: "start"
  },
  reverse: Boolean
});
const Timeline = vue.defineComponent({
  name: "ElTimeline",
  props: timelineProps,
  setup(props, { slots }) {
    const ns = index.useNamespace("timeline");
    vue.provide(tokens.TIMELINE_INJECTION_KEY, {
      props,
      slots
    });
    const timelineKls = vue.computed(() => [ns.b(), ns.is(props.mode)]);
    return () => {
      var _a;
      const children = vnode.flattedChildren(((_a = slots.default) == null ? void 0 : _a.call(slots)) ?? []);
      return vue.h("ul", { class: timelineKls.value }, props.reverse ? children.reverse() : children);
    };
  }
});
exports.default = Timeline;
exports.timelineProps = timelineProps;
