/*!
 * Copyright 2017 by ChartIQ, Inc.
 * All rights reserved.
 */
import React from "react";
/**
 * Toast component. Displays a success/failure message when an app is added/removed
 * @param {object} props Component props
 * @param {string} props.installationActionTaken String containing the action that occurred
 */
const Toast = (props) => {
    let classes = "toast-content";
    let messageContent = null;
    switch (props.installationActionTaken) {
        case "add":
            messageContent = "App Added";
            classes = `${classes} success`;
            break;
        case "remove":
            messageContent = "App Removed";
            classes = `${classes} error`;
            break;
        default:
            classes = `${classes} not-shown`;
            break;
    }
    if (messageContent !== null) {
        return (React.createElement("div", { className: classes },
            React.createElement("span", { className: "toast" },
                React.createElement("i", null),
                "\u00A0\u00A0",
                messageContent)));
    }
    else {
        return null;
    }
};
export default Toast;
//# sourceMappingURL=Toast.js.map