"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk3CNSKST2cjs = require('./chunk-3CNSKST2.cjs');var _react = require('react');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var S=_chunk3CNSKST2cjs.a.call(void 0, "EulAvatar",["root","isImage","disabled"]),y=t=>_chunk5KRCPBZRcjs.e.call(void 0, "EulAvatar",{root:[t.disabled&&"disabled",!!t.src&&"isImage","root"]}),i= exports.a =S;var _react3 = require('@emotion/react');var b=_chunk3CNSKST2cjs.m.call(void 0, "span",{shouldForwardProp:t=>!["fontSize","lineHeight","size"].includes(t.toString())})(({fontSize:t,lineHeight:p,size:o=20,theme:r})=>_react3.css`
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: ${o}px;
    height: ${o}px;
    overflow: hidden;
    color: ${r.palette.common.white};
    font-size: ${t||r.typography.body2.fontSize};
    line-height: ${p||r.typography.body2.lineHeight};
    background-color: ${r.palette.background[600]};
    border: 1px solid ${r.palette.background[700]};
    border-radius: 50%;
    transition: ${r.transitions.create(["border-color"])};
    user-select: none;

    &:hover {
      border-color: ${r.palette.background[700]};
    }

    &.${i.isImage} {
      border-width: 0;
    }

    &.${i.disabled} {
      cursor: not-allowed;
      opacity: 0.5;

      &:hover {
        border-color: ${r.palette.background[700]};
      }
    }

    &:focus-visible {
      outline: ${r.spacing(.5)} solid ${r.palette.yellow[600]};
      outline-offset: ${r.spacing(.5)};
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      color: transparent;
      text-align: center;
      text-indent: 10000px;
    }
  `);var _jsxruntime = require('react/jsx-runtime');var h=_react.forwardRef.call(void 0, (t,p)=>{let{children:o,className:r,loading:v,size:e=20,src:s,...A}=t,a=_chunk3CNSKST2cjs.n.call(void 0, ),$=y(t),[l,n]=_react.useState.call(void 0, !1),x=()=>{n(!0)};_chunk5KRCPBZRcjs.n.call(void 0, s,()=>{n(!1)});let d=e<36?a.typography.body2:e<44?a.typography.body1:e<54?a.typography.subtitle3:e<60?a.typography.subtitle2:e<72||e<124?a.typography.subtitle1:a.typography.h5;return _jsxruntime.jsxs.call(void 0, b,{...A,className:_clsx2.default.call(void 0, $.root,r),fontSize:d.fontSize,lineHeight:d.lineHeight,ref:p,size:e,tabIndex:0,children:[(!s||l)&&o&&`${o.split(" ")[0][0]}${o.split(" ")[1]?o.split(" ")[1][0].toLowerCase():""}`,s&&!l&&_jsxruntime.jsx.call(void 0, "img",{alt:o,loading:v,onError:x,src:s})]})});h.displayName="Avatar";var H=h;exports.a = i; exports.b = H;
