"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 DashboardStyledComponents_1 = require("./DashboardStyledComponents");
exports.DashboardUserProfileSummary = function (props) {
    var userAvatarImgDataURL = props.userAvatarImgDataURL, userHandle = props.userHandle, userEmailAddress = props.userEmailAddress, onSetEmailClicked = props.onSetEmailClicked, onSetAvatarClicked = props.onSetAvatarClicked;
    var initial = userHandle ? userHandle.charAt(0) : "?";
    return (React.createElement(DashboardStyledComponents_1.StyledUserProfile, null,
        userAvatarImgDataURL && (React.createElement(DashboardStyledComponents_1.StyledAvatarContainer, { onClick: function () {
                onSetAvatarClicked();
            } },
            React.createElement(DashboardStyledComponents_1.StyledUserAvatar, { src: userAvatarImgDataURL }),
            React.createElement(DashboardStyledComponents_1.StyledEditAvatar, null),
            React.createElement(DashboardStyledComponents_1.StyledEditSpan, null, "Edit"))),
        !userAvatarImgDataURL && (React.createElement(DashboardStyledComponents_1.StyledAvatarContainer, { onClick: function () {
                onSetAvatarClicked();
            } },
            React.createElement(DashboardStyledComponents_1.StyledUserNoAvatar, null, initial),
            React.createElement(DashboardStyledComponents_1.StyledEditAvatar, null),
            React.createElement(DashboardStyledComponents_1.StyledEditSpan, null, "Edit"))),
        React.createElement(DashboardStyledComponents_1.StyledUserHandleAndEmailContainer, null,
            React.createElement(DashboardStyledComponents_1.StyledUserHandleText, null, userHandle),
            userEmailAddress && React.createElement(DashboardStyledComponents_1.StyledUserEmailText, null, userEmailAddress),
            userEmailAddress && (React.createElement(DashboardStyledComponents_1.StyledChangeUserEmailText, { onClick: function () {
                    onSetEmailClicked();
                } }, "change email")),
            !userEmailAddress && (React.createElement(DashboardStyledComponents_1.StyledUserSetEmailText, { onClick: function () {
                    onSetEmailClicked();
                } }, "set email")))));
};
//# sourceMappingURL=DashboardUserProfileSummary.js.map