"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 profile_1 = __importDefault(require("lib/hooks/profile"));
var util_1 = require("lib/share/util");
function Name(_a) {
    var account_id = _a.account_id, style = _a.style;
    var profile = (0, profile_1.default)({ account_id: account_id });
    if (profile == null) {
        return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
    }
    var first_name = profile.first_name, last_name = profile.last_name;
    return (0, jsx_runtime_1.jsx)("span", __assign({ style: style }, { children: (0, util_1.trunc)("".concat(first_name, " ").concat(last_name), 50) }));
}
exports.default = Name;
//# sourceMappingURL=name.js.map