import { j as jsxRuntimeExports } from '../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
import { Root as $cddcb0b647441e34$export$be92b6f5f03c0fe9, Image as $cddcb0b647441e34$export$3e431a229df88919, Fallback as $cddcb0b647441e34$export$fb8d7f40caaeea67 } from '../node_modules/.pnpm/@radix-ui_react-avatar@1.0.3_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-avatar/dist/index.js';
import { cva } from '../node_modules/.pnpm/class-variance-authority@0.6.0_typescript@5.4.3/node_modules/class-variance-authority/dist/index.js';
import { forwardRef } from 'react';
import { Box } from '../box/box.js';
import styles from './avatar.module.css.js';

const avatar = cva(styles.avatar, {
    variants: {
        shape: {
            square: styles["avatar-square"],
            circle: styles["avatar-circle"],
        },
        disabled: {
            true: styles["avatar-disabled"],
        },
    },
    defaultVariants: {
        shape: "circle",
    },
});
const image = cva(styles.image);
const AvatarRoot = forwardRef(({ className, alt, src, fallback, shape, style, imageProps, ...props }, ref) => (jsxRuntimeExports.jsx(Box, { className: styles.imageWrapper, style: style, children: jsxRuntimeExports.jsxs($cddcb0b647441e34$export$be92b6f5f03c0fe9, { ref: ref, className: avatar({ shape, className }), style: imageProps, ...props, children: [jsxRuntimeExports.jsx(AvatarImage, { alt: alt, src: src }), jsxRuntimeExports.jsx(AvatarFallback, { children: fallback })] }) })));
AvatarRoot.displayName = $cddcb0b647441e34$export$be92b6f5f03c0fe9.displayName;
const AvatarImage = forwardRef(({ className, sizes, ...props }, ref) => (jsxRuntimeExports.jsx($cddcb0b647441e34$export$3e431a229df88919, { ref: ref, className: image({ className }), ...props })));
AvatarImage.displayName = $cddcb0b647441e34$export$3e431a229df88919.displayName;
const fallback = cva(styles.fallback);
const AvatarFallback = forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx($cddcb0b647441e34$export$fb8d7f40caaeea67, { ref: ref, className: fallback({ className }), ...props })));
AvatarFallback.displayName = $cddcb0b647441e34$export$fb8d7f40caaeea67.displayName;
/**
 * @deprecated Use Avatar from '@raystack/apsara/v1' instead.
 */
const Avatar = Object.assign(AvatarRoot, {
    Image: AvatarImage,
    Fallback: AvatarFallback,
});

export { Avatar };
//# sourceMappingURL=avatar.js.map
