import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { SoftIcon, } from '../Icon';
import { SoftI18n, } from '../I18n';
const statusToClassNameMap = {
    complete: 'softStepNumber--complete',
    incomplete: 'softStepNumber--incomplete',
    warning: 'softStepNumber--warning',
    danger: 'softStepNumber--danger',
    disabled: 'softStepNumber--disabled',
};
export const STATUS = Object.keys(statusToClassNameMap);
export const SoftStepNumber = ({ className, status, number, isHollow, ...rest }) => {
    const classes = classNames('softStepNumber', statusToClassNameMap[status], {
        'softStepNumber-isHollow': isHollow,
    }, className);
    let numberOrIcon;
    if (status === 'complete') {
        numberOrIcon = (React.createElement(SoftI18n, { token: "softStepNumber.isComplete", default: "complete" }, isComplete => React.createElement(SoftIcon, { type: "check", className: "softStepNumber__icon", title: isComplete })));
    }
    else if (status === 'warning') {
        numberOrIcon = (React.createElement(SoftI18n, { token: "softStepNumber.hasWarnings", default: "has warnings" }, hasWarnings => React.createElement(SoftIcon, { type: "alert", className: "softStepNumber__icon", title: hasWarnings })));
    }
    else if (status === 'danger') {
        numberOrIcon = (React.createElement(SoftI18n, { token: "softStepNumber.hasErrors", default: "has errors" }, hasErrors => React.createElement(SoftIcon, { type: "cross", className: "softStepNumber__icon", title: hasErrors })));
    }
    else if (!isHollow) {
        numberOrIcon = number;
    }
    return (React.createElement("div", Object.assign({ className: classes }, rest), numberOrIcon));
};
// @ts-ignore
SoftStepNumber.propTypes = {
    children: PropTypes.node,
    /**
     * May replace the number provided in props.number with alternate styling
     */
    status: PropTypes.oneOf(STATUS),
    number: PropTypes.number,
    /**
     * Uses a border and removes the step number
     */
    isHollow: PropTypes.bool,
};
//# sourceMappingURL=SoftStepNumber.js.map