import React from 'react';
import { TopUpRadio } from '../TopUpRadio';
import { TopUpProvider } from '../../../core/models/TopUpProvider';
import { getOnRampProviderLogo } from './getOnRampProviderLogo';
var FiatProviderTopUp = function (_a) {
    var topUpProvider = _a.topUpProvider, providerLogo = _a.providerLogo, setPaymentMethod = _a.setPaymentMethod, currentPaymentMethod = _a.currentPaymentMethod;
    return (React.createElement(TopUpRadio, { checked: currentPaymentMethod === topUpProvider, onClick: function () { return setPaymentMethod(topUpProvider); }, name: "payment-method", className: "fiat-payment-method" },
        React.createElement("img", { src: providerLogo, srcSet: providerLogo, alt: topUpProvider.toLowerCase(), className: topUpProvider.toLowerCase() + "-logo" })));
};
export var FiatPaymentMethods = function (_a) {
    var selectedCountry = _a.selectedCountry, supportService = _a.supportService, paymentMethod = _a.paymentMethod, setPaymentMethod = _a.setPaymentMethod, _b = _a.logoColor, logoColor = _b === void 0 ? 'white' : _b;
    var rampLogo = getOnRampProviderLogo('ramp', logoColor);
    var safelloLogo = getOnRampProviderLogo('safello', logoColor);
    var wyreLogo = getOnRampProviderLogo('wyre', logoColor);
    return (React.createElement("div", { className: "fiat-payment-methods" },
        supportService.checkRampSupport(selectedCountry) &&
            React.createElement(FiatProviderTopUp, { topUpProvider: TopUpProvider.RAMP, providerLogo: rampLogo, setPaymentMethod: setPaymentMethod, currentPaymentMethod: paymentMethod }),
        supportService.checkSafelloSupport(selectedCountry) &&
            React.createElement(FiatProviderTopUp, { topUpProvider: TopUpProvider.SAFELLO, providerLogo: safelloLogo, setPaymentMethod: setPaymentMethod, currentPaymentMethod: paymentMethod }),
        supportService.checkWyreSupport(selectedCountry) &&
            React.createElement(FiatProviderTopUp, { topUpProvider: TopUpProvider.WYRE, providerLogo: wyreLogo, setPaymentMethod: setPaymentMethod, currentPaymentMethod: paymentMethod })));
};
//# sourceMappingURL=FiatPaymentMethods.js.map