"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var ContributorsStyledComponents_1 = require("./ContributorsStyledComponents");
var elements_1 = require("@joincivil/elements");
var ContributorsDefaultAvatar_1 = require("./ContributorsDefaultAvatar");
exports.Contributors = function (props) {
    return (React.createElement(ContributorsStyledComponents_1.ContributorsStyled, null,
        React.createElement(ContributorsStyledComponents_1.ContributorsTitle, null, "Recent Boosters"),
        props.sortedContributors ? (props.sortedContributors.slice(0, 3).map(function (contributor, i) {
            return (React.createElement(ContributorsStyledComponents_1.ContributorItem, { key: i },
                contributor.payerChannel.tiny72AvatarDataUrl ? (React.createElement(ContributorsStyledComponents_1.ContributorAvatar, { src: contributor.payerChannel.tiny72AvatarDataUrl })) : (React.createElement(ContributorsDefaultAvatar_1.ContributorsDefaultAvatar, { contributor: contributor[i], index: i, size: 25 })),
                React.createElement("div", null,
                    React.createElement(ContributorsStyledComponents_1.ContributorUserName, null, contributor.payerChannel.handle),
                    React.createElement(ContributorsStyledComponents_1.ContributorAmount, null, "$" + contributor.usdEquivalent.toFixed(2)))));
        })) : (React.createElement(ContributorsStyledComponents_1.ContributorsPrompt, null,
            React.createElement(ContributorsStyledComponents_1.ContributorsIconBorder, null,
                React.createElement(elements_1.TipIcon, { width: 18, height: 18 })),
            React.createElement(ContributorsStyledComponents_1.ContributorsLabel, null, "Be the first to Boost")))));
};
//# sourceMappingURL=Contributors.js.map