'use strict';

var core = require('@linaria/core');
var react = require('@linaria/react');
var React = require('react');
var color = require('../../styles/token/color.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

const _exp = /*#__PURE__*/() => ({
  background
}) => background;
const AvatarWrapper = /*#__PURE__*/react.styled('span')({
  name: "AvatarWrapper",
  class: "E_a1b5xrg3",
  propsAsIs: false,
  vars: {
    "a1b5xrg3-0": [_exp()]
  }
});
const Avatar = ({
  username,
  className,
  background = "light-blue"
}) => {
  return /* @__PURE__ */React__default.default.createElement(AvatarWrapper, {
    background: color.Color.gradient[background] || background,
    className: core.cx(className, "user-icon btn-item")
  }, /* @__PURE__ */React__default.default.createElement("span", {
    className: "user-icon-inner"
  }, username.substring(0, 1)));
};
var Avatar$1 = Avatar;

module.exports = Avatar$1;
