'use strict';

var jsxRuntime = require('../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
var index = require('../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.cjs');
var index$1 = require('../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
var React = require('react');
var box = require('../box/box.cjs');
var avatar_module = require('./avatar.module.css.cjs');

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

exports.Avatar = Avatar;
//# sourceMappingURL=avatar.cjs.map
