import React from 'react';
import { CheckCircle, CloseCircle, LoadingCircle, PaperClip } from '../_utils/components';
import Progress from '../progress';
var UploadList = function (props) {
    var prefixCls = props.prefixCls, fileList = props.fileList, onRemove = props.onRemove;
    return (React.createElement("ul", { className: prefixCls + "__upload-list" }, fileList.map(function (file) {
        var uid = file.uid, name = file.name, status = file.status, percent = file.percent;
        return (React.createElement("li", { key: uid, className: prefixCls + "__upload-list-item" },
            React.createElement("div", { className: prefixCls + "__upload-list-item-container" },
                React.createElement(PaperClip, { size: 11, color: "rgba(0, 0, 0, 0.45)" }),
                React.createElement("span", { className: prefixCls + "__upload-list-item-name" }, name),
                React.createElement("span", { className: prefixCls + "__upload-list-item-status" },
                    status === 'done' && React.createElement(CheckCircle, { size: 16 }),
                    status === 'error' && React.createElement(CloseCircle, { size: 16 }),
                    status === 'uploading' && (React.createElement(LoadingCircle, { style: { animation: 'ty-rotate 1s linear infinite' }, color: "#1890ff", size: 16 }))),
                React.createElement("span", { className: prefixCls + "__upload-list-item-delete", onClick: function () { return onRemove && onRemove(file); } }, "\u2715")),
            status === 'uploading' && (React.createElement(Progress.Bar, { strokeColor: "blue", percent: percent, showInfo: false, style: { marginTop: 5 }, strokeWidth: 2 }))));
    })));
};
UploadList.displayName = 'UploadList';
export default UploadList;
//# sourceMappingURL=upload-list.js.map