"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const antd_1 = require("antd");
const A_1 = __importDefault(require("components/misc/A"));
const icon_1 = require("@cocalc/frontend/components/icon");
const misc_1 = require("@cocalc/util/misc");
function GithubAvatar({ style, size = 195 / 2, name }) {
    const url = `https://github.com/${name}`;
    return ((0, jsx_runtime_1.jsx)(antd_1.Tooltip, { title: `Open the GitHub pag ${url} in a new tab.`, placement: "left", children: (0, jsx_runtime_1.jsx)("div", { style: { textAlign: "center", ...style }, children: (0, jsx_runtime_1.jsxs)(A_1.default, { 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/${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