/**
 * amis-ui v6.11.0-beta.8
 * Copyright 2018-2025 fex
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var tslib = require('tslib');
require('react');
var amisCore = require('amis-core');
var TimelineItem = require('./TimelineItem.js');

var __react_jsx__ = require('react');
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
(__react_jsx__["default"] || __react_jsx__).Fragment;
function Timeline(props) {
    var items = props.items, style = props.style, cx = props.classnames, className = props.className, iconClassName = props.iconClassName, timeClassName = props.timeClassName, titleClassName = props.titleClassName, detailClassName = props.detailClassName, _a = props.direction, direction = _a === void 0 ? 'vertical' : _a, _b = props.reverse, reverse = _b === void 0 ? false : _b, _c = props.mode, mode = _c === void 0 ? 'right' : _c;
    var timelineDatasource = items === null || items === void 0 ? void 0 : items.slice();
    reverse && (timelineDatasource === null || timelineDatasource === void 0 ? void 0 : timelineDatasource.reverse());
    return (_J$X_("div", { className: cx('Timeline', "Timeline-".concat(direction), "Timeline-".concat(mode), className), style: style }, timelineDatasource === null || timelineDatasource === void 0 ? void 0 : timelineDatasource.map(function (item, index) { return (_J$X_(TimelineItem["default"], tslib.__assign({}, item, { key: "TimelineItem-".concat(index), iconClassName: item.iconClassName || iconClassName, timeClassName: item.timeClassName || timeClassName, titleClassName: item.titleClassName || titleClassName, detailClassName: item.detailClassName || detailClassName }))); })));
}
var Timeline$1 = amisCore.themeable(Timeline);

exports.Timeline = Timeline;
exports["default"] = Timeline$1;
