import { CircleDashed, SuccessFill, X } from "@sofa-design/icons";
import classNames from "clsx";
import React, { memo, useMemo } from "react";
import { Loading } from "../../Components/Loading";
import { LOADING_SIZE } from "../constants";
var StatusIconComponent = function StatusIconComponent(param) {
    var status = param.status, prefixCls = param.prefixCls, hashId = param.hashId;
    var statusContent = useMemo(function() {
        var contentMap = {
            success: /*#__PURE__*/ React.createElement(SuccessFill, null),
            loading: /*#__PURE__*/ React.createElement(Loading, {
                size: LOADING_SIZE
            }),
            pending: /*#__PURE__*/ React.createElement("div", {
                className: classNames("".concat(prefixCls, "-status-idle"), hashId)
            }, /*#__PURE__*/ React.createElement(CircleDashed, null)),
            error: /*#__PURE__*/ React.createElement(X, null)
        };
        return contentMap[status];
    }, [
        status,
        prefixCls,
        hashId
    ]);
    return /*#__PURE__*/ React.createElement("div", {
        className: classNames("".concat(prefixCls, "-status"), "".concat(prefixCls, "-status-").concat(status), hashId),
        "data-testid": "task-list-status-".concat(status)
    }, statusContent);
};
StatusIconComponent.displayName = 'StatusIcon';
export var StatusIcon = /*#__PURE__*/ memo(StatusIconComponent);
