"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
var antd_1 = require("antd");
var A_1 = __importDefault(require("components/misc/A"));
var icon_1 = require("@cocalc/frontend/components/icon");
var misc_1 = require("@cocalc/util/misc");
function GithubAvatar(_a) {
    var style = _a.style, _b = _a.size, size = _b === void 0 ? 195 / 2 : _b, name = _a.name;
    var url = "https://github.com/".concat(name);
    return ((0, jsx_runtime_1.jsx)(antd_1.Tooltip, __assign({ title: "Open the GitHub pag ".concat(url, " in a new tab."), placement: "left" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ style: __assign({ textAlign: "center" }, style) }, { children: (0, jsx_runtime_1.jsxs)(A_1.default, __assign({ href: url }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Avatar, { style: { borderRadius: "7.5px", border: "1px solid #eee" }, shape: "square", size: size, icon: (0, jsx_runtime_1.jsx)("img", { src: "https://avatars.githubusercontent.com/".concat(name) }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "external-link" }), " ", (0, misc_1.trunc)(name, 28), " ", (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "github" })] })] })) })) })));
}
exports.default = GithubAvatar;
//# sourceMappingURL=avatar.js.map