"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    Avatar: function() {
        return Avatar;
    },
    AvatarFallback: function() {
        return AvatarFallback;
    },
    AvatarImage: function() {
        return AvatarImage;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
const _reactavatar = /*#__PURE__*/ _interop_require_wildcard(require("@radix-ui/react-avatar"));
const _css = require("../utils/css");
const _classvarianceauthority = require("class-variance-authority");
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
const avatarVariants = (0, _classvarianceauthority.cva)([], {
    variants: {
        size: {
            small: "orderly-h-[18px] orderly-w-[18px]",
            medium: "orderly-h-[24px] orderly-w-[24px]",
            large: "orderly-h-[32px] orderly-w-[32px]"
        }
    },
    defaultVariants: {
        size: "medium"
    }
});
const Avatar = /*#__PURE__*/ _react.forwardRef(({ className, size, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactavatar.Root, {
        ref: ref,
        className: (0, _css.cn)("orderly-relative orderly-flex orderly-h-10 orderly-w-10 orderly-shrink-0 orderly-overflow-hidden orderly-rounded-full", avatarVariants({
            size,
            className
        })),
        ...props
    }));
Avatar.displayName = _reactavatar.Root.displayName;
const AvatarImage = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactavatar.Image, {
        ref: ref,
        className: (0, _css.cn)("orderly-aspect-square orderly-h-full orderly-w-full", className),
        ...props
    }));
AvatarImage.displayName = _reactavatar.Image.displayName;
const AvatarFallback = /*#__PURE__*/ _react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_reactavatar.Fallback, {
        ref: ref,
        className: (0, _css.cn)("orderly-flex orderly-h-full orderly-w-full orderly-items-center orderly-justify-center orderly-rounded-full orderly-bg-base-200", className),
        ...props
    }));
AvatarFallback.displayName = _reactavatar.Fallback.displayName;

//# sourceMappingURL=avatar.js.map