import { cn } from "./cva.js";
import "react";
import { cva } from "class-variance-authority";
import { jsx, jsxs } from "react/jsx-runtime";
import * as RAvatar from "@radix-ui/react-avatar";
//#region src/Avatar.tsx
const avatarVariants = cva("inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-border bg-[var(--mod-color-accent-3)] text-[var(--mod-color-accent-11)]", {
	variants: { size: {
		sm: "h-6 w-6 text-xs",
		md: "h-8 w-8 text-sm",
		lg: "h-12 w-12 text-base"
	} },
	defaultVariants: { size: "md" }
});
function Avatar({ src, alt, fallback, size, className }) {
	return /* @__PURE__ */ jsxs(RAvatar.Root, {
		className: cn(avatarVariants({ size }), className),
		children: [src ? /* @__PURE__ */ jsx(RAvatar.Image, {
			src,
			alt,
			className: "h-full w-full object-cover"
		}) : null, /* @__PURE__ */ jsx(RAvatar.Fallback, {
			className: "font-medium data-[state=visible]:bg-[var(--mod-color-accent-3)]",
			children: fallback
		})]
	});
}
//#endregion
export { Avatar };
