'use strict';
'use client';
import { jsx } from 'react/jsx-runtime';
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
import { cn } from '../../../fd-toolbox/lib/utils.js';
import '../client/framework/index.js';
import FrameworkImage from 'next/image.js';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
const fallbackAvatarSrc = "/images/profile.webp";
function Avatar({
  className,
  children,
  ref
}) {
  return /* @__PURE__ */jsx(Avatar$1.Root, {
    ref,
    className: cn("relative flex size-10 shrink-0 overflow-hidden rounded-full", className),
    children
  });
}
__name(Avatar, "Avatar");
Avatar.displayName = Avatar$1.Root.displayName;
function AvatarImage({
  className,
  ref,
  src,
  alt,
  children
}) {
  return /* @__PURE__ */jsx(Avatar$1.Image, {
    ref,
    src,
    alt,
    className: cn("aspect-square size-full", className),
    children
  });
}
__name(AvatarImage, "AvatarImage");
AvatarImage.displayName = Avatar$1.Image.displayName;
function AvatarFallback({
  className,
  ref,
  children
}) {
  return /* @__PURE__ */jsx(Avatar$1.Fallback, {
    ref,
    className: cn("bg-muted flex size-full items-center justify-center rounded-full", className),
    children: children ?? /* @__PURE__ */jsx(FrameworkImage, {
      src: fallbackAvatarSrc,
      alt: "Avatar",
      width: 40,
      height: 40,
      className: "size-full object-cover",
      loading: "lazy"
    })
  });
}
__name(AvatarFallback, "AvatarFallback");
AvatarFallback.displayName = Avatar$1.Fallback.displayName;

export { Avatar, AvatarFallback, AvatarImage, fallbackAvatarSrc };
