"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var TopUpRadio_1 = require("../TopUpRadio");
var TopUpProvider_1 = require("../../../core/models/TopUpProvider");
var getOnRampProviderLogo_1 = require("./getOnRampProviderLogo");
var FiatProviderTopUp = function (_a) {
    var topUpProvider = _a.topUpProvider, providerLogo = _a.providerLogo, setPaymentMethod = _a.setPaymentMethod, currentPaymentMethod = _a.currentPaymentMethod;
    return (react_1.default.createElement(TopUpRadio_1.TopUpRadio, { checked: currentPaymentMethod === topUpProvider, onClick: function () { return setPaymentMethod(topUpProvider); }, name: "payment-method", className: "fiat-payment-method" },
        react_1.default.createElement("img", { src: providerLogo, srcSet: providerLogo, alt: topUpProvider.toLowerCase(), className: topUpProvider.toLowerCase() + "-logo" })));
};
exports.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_1.getOnRampProviderLogo('ramp', logoColor);
    var safelloLogo = getOnRampProviderLogo_1.getOnRampProviderLogo('safello', logoColor);
    var wyreLogo = getOnRampProviderLogo_1.getOnRampProviderLogo('wyre', logoColor);
    return (react_1.default.createElement("div", { className: "fiat-payment-methods" },
        supportService.checkRampSupport(selectedCountry) &&
            react_1.default.createElement(FiatProviderTopUp, { topUpProvider: TopUpProvider_1.TopUpProvider.RAMP, providerLogo: rampLogo, setPaymentMethod: setPaymentMethod, currentPaymentMethod: paymentMethod }),
        supportService.checkSafelloSupport(selectedCountry) &&
            react_1.default.createElement(FiatProviderTopUp, { topUpProvider: TopUpProvider_1.TopUpProvider.SAFELLO, providerLogo: safelloLogo, setPaymentMethod: setPaymentMethod, currentPaymentMethod: paymentMethod }),
        supportService.checkWyreSupport(selectedCountry) &&
            react_1.default.createElement(FiatProviderTopUp, { topUpProvider: TopUpProvider_1.TopUpProvider.WYRE, providerLogo: wyreLogo, setPaymentMethod: setPaymentMethod, currentPaymentMethod: paymentMethod })));
};
//# sourceMappingURL=FiatPaymentMethods.js.map