import React from 'react';
import { safeMultiply } from '@universal-login/commons';
import { calculateTransactionFee } from '../../../core/utils/calculateTransactionFee';
import { getIconForToken } from '../../../core/utils/getIconForToken';
export var SelectedGasPrice = function (_a) {
    var modeName = _a.modeName, gasLimit = _a.gasLimit, gasOption = _a.gasOption, usdAmount = _a.usdAmount, onClick = _a.onClick;
    return (React.createElement("div", { className: "gas-price-selected" },
        React.createElement("div", { className: "gas-price-selected-row" },
            React.createElement("div", null,
                React.createElement("div", { className: "transaction-fee-details" },
                    React.createElement("img", { src: getIconForToken(gasOption.token.symbol), alt: "", className: "transaction-fee-item-icon" }),
                    React.createElement("div", null,
                        React.createElement("p", { className: "transaction-fee-amount-usd" },
                            calculateTransactionFee(usdAmount, gasLimit),
                            " USD"),
                        React.createElement("p", { className: "transaction-fee-amount" },
                            safeMultiply(gasOption.gasPrice, gasLimit),
                            " ",
                            gasOption.token.symbol)))),
            React.createElement("hr", { className: "gas-price-selected-divider" }),
            React.createElement("div", null,
                React.createElement("p", { className: "transaction-speed-type" }, modeName))),
        React.createElement("button", { className: "gas-price-btn", onClick: onClick })));
};
//# sourceMappingURL=SelectedGasPrice.js.map