"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.n = (module)=>{
        var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
(()=>{
    __webpack_require__.d = (exports1, definition)=>{
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (exports1)=>{
        if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    getInitial: ()=>getInitial,
    InitialsBadge: ()=>InitialsBadge
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const styled_namespaceObject = require("@emotion/styled");
var styled_default = /*#__PURE__*/ __webpack_require__.n(styled_namespaceObject);
const InitialsBadgeRoot = styled_default().span`
  display: inline-flex;
  width: var(--initials-badge-size, 24px);
  height: var(--initials-badge-size, 24px);
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--canvas-primary);
  color: var(--canvas-on-primary, #ffffff);
  font-size: calc(var(--initials-badge-size, 24px) * 0.5);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
`;
function getInitial(name) {
    const trimmed = name.trim();
    if (!trimmed) return '?';
    return [
        ...trimmed
    ][0] ?? '?';
}
function InitialsBadge({ name, size, className, style, 'data-testid': dataTestId }) {
    const mergedStyle = (()=>{
        const sizeStyle = size ? {
            ['--initials-badge-size']: size
        } : void 0;
        if (!sizeStyle && !style) return;
        return {
            ...sizeStyle,
            ...style
        };
    })();
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(InitialsBadgeRoot, {
        "aria-hidden": "true",
        className: className,
        "data-testid": dataTestId,
        style: mergedStyle,
        children: getInitial(name)
    });
}
exports.InitialsBadge = __webpack_exports__.InitialsBadge;
exports.getInitial = __webpack_exports__.getInitial;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "InitialsBadge",
    "getInitial"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
