import React, { PureComponent } from 'react';
import classNames from 'classnames';
// import { SoftScreenReaderOnly } from '../accessibility';
// import { SoftI18n } from '../i18n';
// import {
//   ICON_TYPES,
//   SoftIcon,
// } from '../icon';
import { SoftText, } from '../text';
const colorToClassNameMap = {
    primary: 'softToast--primary',
    success: 'softToast--success',
    warning: 'softToast--warning',
    danger: 'softToast--danger',
};
export const SOFT_TOAST_COLORS = Object.keys(colorToClassNameMap);
export class SoftToast extends PureComponent {
    render() {
        // let {title, color, iconType, onClose, children, className, ...rest} = this.props;
        let { title, color, onClose, children, className, ...rest } = this.props;
        const classes = classNames('softToast', colorToClassNameMap[color], className);
        const headerClasses = classNames('softToastHeader', {
            'softToastHeader--withBody': children,
        });
        let headerIcon;
        // if (iconType) {
        //   headerIcon = (
        //     <SoftIcon
        //       className="softToastHeader__icon"
        //       type={iconType}
        //       size="m"
        //       aria-hidden="true"
        //     />
        //   );
        // }
        let closeButton;
        // if (onClose) {
        //   closeButton = (
        //     <SoftI18n token="softToast.dismissToast" default="Dismiss toast">
        //       {dismissToast => (
        //         <button
        //           type="button"
        //           className="softToast__closeButton"
        //           aria-label={dismissToast}
        //           onClick={onClose}
        //           data-test-subj="toastCloseButton"
        //         >
        //           <SoftIcon
        //             type="cross"
        //             size="m"
        //             aria-hidden="true"
        //           />
        //         </button>
        //       )}
        //     </SoftI18n>
        //   );
        // }
        let optionalBody;
        if (children) {
            optionalBody = (React.createElement(SoftText, { size: "s", className: "softToastBody" }, children));
        }
        return (React.createElement("div", Object.assign({ className: classes, "aria-live": "polite" }, rest),
            React.createElement("span", { className: "softToastHeader__title" }, title),
            closeButton,
            optionalBody));
    }
}
//# sourceMappingURL=SoftToast.js.map