import "./AvatarGroup.css";
import {AvatarContext as $3ffa2cd930156220$export$a20dad690e1279e2} from "./Avatar.mjs";
import {useDOMRef as $80ecb974df713a30$export$c2c55ef9111cafd8} from "./useDOMRef.mjs";
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../../icons/useSpectrumContextProps.mjs";
import {jsx as $6MvCt$jsx, jsxs as $6MvCt$jsxs} from "react/jsx-runtime";
import {createContext as $6MvCt$createContext, forwardRef as $6MvCt$forwardRef} from "react";
import {filterDOMProps as $6MvCt$filterDOMProps} from "react-aria/filterDOMProps";
import {useLabel as $6MvCt$useLabel} from "react-aria/useLabel";

/*
 * Copyright 2024 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */ 






const $85e1de65a7290f4a$export$4f18251748129091 = /*#__PURE__*/ (0, $6MvCt$createContext)(null);
const $85e1de65a7290f4a$var$avatar = " I4gnV8d12 Iby12";
const $85e1de65a7290f4a$var$text = function anonymous(props) {
    let rules = " ";
    rules += ' Iv12';
    rules += ' _Nc12';
    rules += ' Pc12';
    rules += ' _Yb12';
    rules += ' _7c12';
    if (props.size === "40") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "36") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "32") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "28") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "24") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "20") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "16") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    }
    if (props.size === "40") {
        rules += ' -_6BNtrc-g12';
        rules += ' vx12';
    } else if (props.size === "36") {
        rules += ' -_6BNtrc-f12';
        rules += ' vx12';
    } else if (props.size === "32") {
        rules += ' -_6BNtrc-e12';
        rules += ' vx12';
    } else if (props.size === "28") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "24") {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    } else if (props.size === "20") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "16") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    }
    if (props.size === "40") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "36") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "32") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "28") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "24") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "20") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "16") {
        rules += ' xb12';
        rules += ' _xa12';
    }
    if (props.size === "40") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "36") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "32") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "28") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "24") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "20") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "16") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    }
    if (props.size === "40") rules += ' pt12';
    else if (props.size === "36") rules += ' pt12';
    else if (props.size === "32") rules += ' pt12';
    else if (props.size === "28") rules += ' pt12';
    else if (props.size === "24") rules += ' pt12';
    else if (props.size === "20") rules += ' pt12';
    else if (props.size === "16") rules += ' pt12';
    return rules;
};
const $85e1de65a7290f4a$var$container = function anonymous(props, overrides) {
    let rules = " ";
    rules += (String(overrides || '').match(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6)[^\s]+/g) || []).join('');
    rules += ' sd12';
    rules += ' eb12';
    return rules;
};
const $85e1de65a7290f4a$export$5b26ebaf2b105908 = /*#__PURE__*/ (0, $6MvCt$forwardRef)(function AvatarGroup(props, ref) {
    [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $85e1de65a7290f4a$export$4f18251748129091);
    let domRef = (0, $80ecb974df713a30$export$c2c55ef9111cafd8)(ref);
    let { children: children, label: label, size: size = 24, styles: styles, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className, ...otherProps } = props;
    let { labelProps: labelProps, fieldProps: fieldProps } = (0, $6MvCt$useLabel)({
        ...props,
        labelElementType: 'span'
    });
    return /*#__PURE__*/ (0, $6MvCt$jsx)((0, $3ffa2cd930156220$export$a20dad690e1279e2).Provider, {
        value: {
            styles: $85e1de65a7290f4a$var$avatar,
            size: size,
            isOverBackground: true
        },
        children: /*#__PURE__*/ (0, $6MvCt$jsxs)("div", {
            ref: domRef,
            ...(0, $6MvCt$filterDOMProps)(otherProps),
            ...fieldProps,
            role: "group",
            className: (UNSAFE_className ?? '') + $85e1de65a7290f4a$var$container(null, styles),
            style: {
                ...UNSAFE_style,
                '--size': size / 16 + 'rem'
            },
            children: [
                children,
                label && /*#__PURE__*/ (0, $6MvCt$jsx)("span", {
                    ...labelProps,
                    className: $85e1de65a7290f4a$var$text({
                        size: String(size)
                    }),
                    children: label
                })
            ]
        })
    });
});


export {$85e1de65a7290f4a$export$4f18251748129091 as AvatarGroupContext, $85e1de65a7290f4a$export$5b26ebaf2b105908 as AvatarGroup};
//# sourceMappingURL=AvatarGroup.mjs.map
