import './DebugAlertContainer.css';
import {Component} from 'react';
import PropTypes from 'prop-types';
import WarningIcon from '../icons/WarningIcon.svg';
import WarningIconWhite from '../icons/WarningIconWhite.svg';
import ErrorIcon from '../icons/ErrorIcon.svg';
import ErrorIconWhite from '../icons/ErrorIconWhite.svg';

class DebugAlertContainer extends Component {
    constructor(props) {
        super(props);
    }
    render() {
        const {alertsOpened} = this.props;
        return (
            <div
                className={`dash-debug-alert-container${
                    alertsOpened ? ' dash-debug-alert-container--opened' : ''
                }`}
                onClick={this.props.onClick}
            >
                <div className="dash-debug-alert">
                    {alertsOpened ? (
                        <ErrorIconWhite className="dash-debug-alert-container__icon" />
                    ) : (
                        <ErrorIcon className="dash-debug-alert-container__icon" />
                    )}
                    {this.props.errors.length}
                </div>
                <div className="dash-debug-alert">
                    {alertsOpened ? (
                        <WarningIconWhite className="dash-debug-alert-container__icon dash-debug-alert-container__icon--warning" />
                    ) : (
                        <WarningIcon className="dash-debug-alert-container__icon dash-debug-alert-container__icon--warning" />
                    )}
                    0
                </div>
            </div>
        );
    }
}

DebugAlertContainer.propTypes = {
    errors: PropTypes.object,
    alertsOpened: PropTypes.bool,
    onClick: PropTypes.function,
};

export {DebugAlertContainer};

@@ -1107,450 +1107,8 @@
 iv%3E%0A
-                %3Cdiv className=%22dash-debug-alert%22%3E%0A                    %7BalertsOpened ? (%0A                        %3CWarningIconWhite className=%22dash-debug-alert-container__icon dash-debug-alert-container__icon--warning%22 /%3E%0A                    ) : (%0A                        %3CWarningIcon className=%22dash-debug-alert-container__icon dash-debug-alert-container__icon--warning%22 /%3E%0A                    )%7D%0A                    0%0A                %3C/div%3E%0A
     

remove unused warnings ui