import { __assign, __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import cx from 'classnames';
import { Alert } from '../alert';
var TypePropsMap = {
    info: {
        type: 'info',
    },
    waiting: {
        type: 'info',
        loading: true,
    },
    success: {
        type: 'success',
    },
    error: {
        type: 'error',
    },
};
export var StatusBar = function (_a) {
    var _b = _a.type, type = _b === void 0 ? 'info' : _b, progress = _a.progress, className = _a.className, _c = _a.closable, closable = _c === void 0 ? true : _c, rest = __rest(_a, ["type", "progress", "className", "closable"]);
    var typeProps = TypePropsMap[type];
    var taskProgress = type === 'waiting' ? progress : 0;
    var statusBarClassName = cx('zent-status-bar', className);
    return (_jsx(Alert, __assign({ className: statusBarClassName }, typeProps, rest, { closable: closable, progress: taskProgress }), void 0));
};
export default StatusBar;
