import { jsxs as n, jsx as i } from "react/jsx-runtime";
import { Typography as c } from "../Typography/Typography.es.js";
import { getFullName as d, getInitials as p } from "./utils.es.js";
import e from "../../components/Profile/styles.module.css";
import { Icon as f } from "../Icon/Icon.es.js";
import { EIconName as g } from "../Icon/constants.es.js";
const x = {
  xl: "profileXl",
  lg: "profileLg",
  md: "profileMd",
  sm: "profileSm",
  xs: "profileXs"
}, S = ({ firstName: l, lastName: s, image: o, size: a = "md", editable: r = !1, onEdit: t }) => {
  const m = r && !["sm", "xs"].includes(a);
  return /* @__PURE__ */ n("div", { className: e.root, "data-size": a, children: [
    o ? /* @__PURE__ */ i("div", { className: e.imageContainer, children: /* @__PURE__ */ i("img", { src: o, alt: d({ firstName: l, lastName: s }), className: e.image }) }) : /* @__PURE__ */ i("div", { className: e.textContainer, children: /* @__PURE__ */ i(c, { defaultVariant: x[a], className: e.name, children: p({ firstName: l, lastName: s }) }) }),
    m && /* @__PURE__ */ i("div", { className: e.editableContainer, onClick: t, children: /* @__PURE__ */ i(f, { name: g.PLUS, className: e.editableIcon }) })
  ] });
};
export {
  S as Profile
};
