require("./SelectBoxGroup.css");
var $af04e099a53d3e85$exports = require("./Checkbox.cjs");
var $dba2b18fc5727f9b$exports = require("./Checkmark.cjs");
var $bde97c91243ed164$exports = require("../icons/Icon.cjs");
var $2061c83559b50a66$exports = require("./pressScale.cjs");
var $6367bc87eb7d24ad$exports = require("./Content.cjs");
var $ac757a4c2bd72aee$exports = require("../icons/useSpectrumContextProps.cjs");
var $gGDF1$reactjsxruntime = require("react/jsx-runtime");
var $gGDF1$reactariacomponents = require("react-aria-components");
var $gGDF1$react = require("react");
var $gGDF1$reactaria = require("react-aria");


function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}

$parcel$export(module.exports, "SelectBoxGroupContext", () => $6a3953abb7deb063$export$cad91f7528e8dc08);
$parcel$export(module.exports, "SelectBox", () => $6a3953abb7deb063$export$ebde6d4e7862fe9d);
$parcel$export(module.exports, "SelectBoxGroup", () => $6a3953abb7deb063$export$da87cf13fc2ef3d8);
/*
 * Copyright 2025 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 CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */ 









const $6a3953abb7deb063$var$SelectBoxContext = /*#__PURE__*/ (0, $gGDF1$react.createContext)({
    orientation: 'vertical'
});
const $6a3953abb7deb063$export$cad91f7528e8dc08 = /*#__PURE__*/ (0, $gGDF1$react.createContext)(null);
const $6a3953abb7deb063$var$labelOnly = ':has([slot=label]):not(:has([slot=description]))';
const $6a3953abb7deb063$var$noIllustration = ':not(:has([slot=illustration]))';
const $6a3953abb7deb063$var$selectBoxStyles = function anonymous(props, overrides) {
    let rules = " ";
    let position = false;
    let width = false;
    let minWidth = false;
    let maxWidth = false;
    let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
    for (let p of matches){
        if (p[1] === "_P") position = true;
        if (p[1] === "Z") width = true;
        if (p[1] === "N") minWidth = true;
        if (p[1] === "L") maxWidth = true;
        rules += p[0];
    }
    if (props.isFocusVisible) rules += ' _Lf12';
    else rules += ' _Le12';
    rules += ' Oh12';
    rules += ' _Mc12';
    rules += ' _Kd12';
    rules += ' se12';
    rules += ' __yM8Mfn12';
    if (!position) rules += ' _Pc12';
    rules += ' uk12';
    rules += ' ucJ9TBTb12';
    rules += ' ud3Euai12';
    rules += ' uea12';
    rules += ' ugb12';
    rules += ' uhd12';
    rules += ' uje12';
    rules += ' u2NhKxcl12';
    rules += ' uic12';
    rules += ' -_6BNtrc-c12';
    rules += ' vx12';
    rules += ' xb12';
    rules += ' _xa12';
    rules += ' _Fd12';
    rules += ' _FnuYUweb12';
    if (props.isDisabled) rules += ' pp12';
    rules += ' ri12';
    rules += ' _oa12';
    rules += ' _Nc12';
    rules += ' Pc12';
    if (props.orientation === "horizontal") {
        if (!width) rules += ' ZAK24ue12';
    } else if (!width) rules += ' Z75oWv12';
    if (props.orientation === "horizontal") rules += ' Fd12';
    else rules += ' F75oWv12';
    if (props.orientation === "horizontal") {
        if (!minWidth) rules += ' NBzUiud12';
    } else if (!minWidth) rules += ' NQGV3L12';
    if (props.orientation === "horizontal") {
        if (!maxWidth) rules += ' LILqIYb12';
    } else if (!maxWidth) rules += ' L75oWv12';
    if (props.orientation === "horizontal") rules += ' MKniM12';
    else rules += ' MQGV3L12';
    if (props.orientation === "horizontal") rules += ' KDvO7ld12';
    else rules += ' K75oWv12';
    if (props.orientation === "horizontal") rules += ' Tf12';
    else rules += ' Th12';
    if (props.orientation === "horizontal") rules += ' Qf12';
    else rules += ' Qh12';
    if (props.orientation === "horizontal") rules += ' Sk12';
    if (props.orientation === "horizontal") rules += ' Rh12';
    if (props.orientation === "horizontal") {
        rules += ' CtXiS9b12';
        rules += ' CbWiMddxbX3ib12';
    } else if (props.orientation === "vertical") rules += ' CfwsTtd12';
    if (props.orientation === "horizontal") {
        rules += ' EtYIsBb12';
        rules += ' E1099pdfYMhHd12';
    } else if (props.orientation === "vertical") rules += ' EOwqVhc12';
    if (props.orientation === "horizontal") rules += ' DJSAqje12';
    if (props.orientation === "vertical") rules += ' _cb12';
    rules += ' oc12';
    rules += ' nc12';
    rules += ' kc12';
    rules += ' jc12';
    rules += ' _jf12';
    if (props.isDisabled) rules += ' iA12';
    else if (props.isSelected) rules += ' in12';
    else rules += ' iA12';
    if (props.isDisabled) rules += ' gH12';
    else rules += ' g_g12';
    if (props.isDisabled) rules += ' _nd12';
    else if (props.isSelected) rules += ' _nLeasBb12';
    else if (props.isHovered) rules += ' _nLeasBb12';
    else rules += ' _n4zCLMe12';
    rules += ' _kc12';
    rules += ' hc12';
    rules += ' mc12';
    rules += ' lc12';
    rules += ' Yd12';
    rules += ' Xb12';
    rules += ' _2b12';
    return rules;
};
const $6a3953abb7deb063$var$illustrationContainer = function anonymous(props) {
    let rules = " ";
    rules += ' zTZ8xtd12';
    rules += ' yTZ8xtd12';
    rules += ' BTZ8xtd12';
    rules += ' ATZ8xtd12';
    rules += ' _dc12';
    rules += ' __Ab12';
    rules += ' Nl12';
    rules += ' Mk12';
    if (props.isDisabled) rules += ' -_8sjo0b-pp12';
    else {
        if (props.isPressed) rules += ' -_8sjo0b-po12';
        else if (props.isFocusVisible) rules += ' -_8sjo0b-po12';
        else if (props.isHovered) rules += ' -_8sjo0b-po12';
        else rules += ' -_8sjo0b-pt12';
    }
    return rules;
};
const $6a3953abb7deb063$var$descriptionText = function anonymous(props) {
    let rules = " ";
    rules += ' z9u7zPc12';
    rules += ' y9u7zPc12';
    rules += ' B9u7zPc12';
    rules += ' A9u7zPc12';
    rules += ' _dc12';
    if (props.orientation === "vertical") rules += ' sk12';
    else rules += ' sb12';
    rules += ' _Nc12';
    rules += ' Pc12';
    if (props.orientation === "horizontal") rules += ' _Wd12';
    else rules += ' _Wa12';
    if (props.isDisabled) rules += ' pp12';
    else {
        if (props.isPressed) rules += ' po12';
        else if (props.isFocusVisible) rules += ' po12';
        else if (props.isHovered) rules += ' po12';
        else rules += ' pt12';
    }
    return rules;
};
const $6a3953abb7deb063$var$labelText = function anonymous(props) {
    let rules = " ";
    rules += ' zv6x9r12';
    rules += ' yv6x9r12';
    rules += ' Bv6x9r12';
    rules += ' Av6x9r12';
    rules += ' _dc12';
    if (props.orientation === "horizontal") rules += ' __Ad12';
    else rules += ' __Ab12';
    rules += ' Za12';
    rules += ' _Nc12';
    rules += ' Pc12';
    rules += ' Na12';
    if (props.orientation === "horizontal") rules += ' _Wd12';
    else rules += ' _Wa12';
    rules += ' _7c12';
    rules += ' _Yb12';
    if (props.orientation === "horizontal") {
        rules += ' xd12';
        rules += ' _xa12';
        rules += ' xX0cczbc12';
        rules += ' _xX0cczba12';
    }
    if (props.isDisabled) rules += ' pp12';
    else {
        if (props.isPressed) rules += ' po12';
        else if (props.isFocusVisible) rules += ' po12';
        else if (props.isHovered) rules += ' po12';
        else rules += ' pt12';
    }
    return rules;
};
const $6a3953abb7deb063$var$gridStyles = function anonymous(props, overrides) {
    let rules = " ";
    rules += ((overrides || '').match(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g) || []).join('');
    rules += ' se12';
    rules += ' __yM8Mfn12';
    rules += ' Uj12';
    rules += ' qj12';
    rules += ' _Ca12';
    if (props.orientation === "vertical") rules += ' -SFnbic-Z75oWv12';
    else if (props.orientation === "horizontal") rules += ' -SFnbic-ZAK24ue12';
    if (props.orientation === "vertical") rules += ' DbFoS412';
    else if (props.orientation === "horizontal") rules += ' DbFoS412';
    return rules;
};
function $6a3953abb7deb063$export$ebde6d4e7862fe9d(props) {
    let { children: children, isDisabled: individualDisabled = false, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className, styles: styles, ...otherProps } = props;
    let { orientation: orientation = 'vertical', isDisabled: groupDisabled = false } = (0, $gGDF1$react.useContext)($6a3953abb7deb063$var$SelectBoxContext);
    const isDisabled = individualDisabled || groupDisabled;
    const ref = (0, $gGDF1$react.useRef)(null);
    let { isFocusVisible: isFocusVisible } = (0, $gGDF1$reactaria.useFocusVisible)();
    return /*#__PURE__*/ (0, $gGDF1$reactjsxruntime.jsx)((0, $gGDF1$reactariacomponents.ListBoxItem), {
        isDisabled: isDisabled,
        ref: ref,
        className: (renderProps)=>(UNSAFE_className || '') + $6a3953abb7deb063$var$selectBoxStyles({
                ...renderProps,
                isFocusVisible: isFocusVisible && renderProps.isFocused,
                orientation: orientation
            }, styles),
        style: (0, $2061c83559b50a66$exports.pressScale)(ref, UNSAFE_style),
        ...otherProps,
        children: ({ isSelected: isSelected, isDisabled: isDisabled, isHovered: isHovered })=>{
            return /*#__PURE__*/ (0, $gGDF1$reactjsxruntime.jsxs)((0, $gGDF1$reactjsxruntime.Fragment), {
                children: [
                    /*#__PURE__*/ (0, $gGDF1$reactjsxruntime.jsx)("div", {
                        className: " _Pa12 WJ12 _AI12 _Ob12",
                        "aria-hidden": "true",
                        children: !isDisabled && /*#__PURE__*/ (0, $gGDF1$reactjsxruntime.jsx)("div", {
                            className: (0, $af04e099a53d3e85$exports.box)({
                                isSelected: isSelected,
                                isDisabled: isDisabled,
                                size: 'M'
                            }),
                            children: /*#__PURE__*/ (0, $gGDF1$reactjsxruntime.jsx)((0, $dba2b18fc5727f9b$exports.default), {
                                size: "S",
                                className: (0, $af04e099a53d3e85$exports.iconStyles)
                            })
                        })
                    }),
                    /*#__PURE__*/ (0, $gGDF1$reactjsxruntime.jsx)((0, $gGDF1$reactariacomponents.Provider), {
                        values: [
                            [
                                (0, $bde97c91243ed164$exports.IllustrationContext),
                                {
                                    size: 'S',
                                    styles: $6a3953abb7deb063$var$illustrationContainer({
                                        size: 'S',
                                        orientation: orientation,
                                        isDisabled: isDisabled,
                                        isHovered: isHovered
                                    })
                                }
                            ],
                            [
                                (0, $6367bc87eb7d24ad$exports.TextContext),
                                {
                                    slots: {
                                        [(0, $gGDF1$reactariacomponents.DEFAULT_SLOT)]: {
                                            styles: $6a3953abb7deb063$var$labelText({
                                                orientation: orientation,
                                                isDisabled: isDisabled,
                                                isHovered: isHovered
                                            })
                                        },
                                        label: {
                                            styles: $6a3953abb7deb063$var$labelText({
                                                orientation: orientation,
                                                isDisabled: isDisabled,
                                                isHovered: isHovered
                                            })
                                        },
                                        description: {
                                            styles: $6a3953abb7deb063$var$descriptionText({
                                                orientation: orientation,
                                                isDisabled: isDisabled,
                                                isHovered: isHovered
                                            })
                                        }
                                    }
                                }
                            ]
                        ],
                        children: children
                    })
                ]
            });
        }
    });
}
const $6a3953abb7deb063$export$da87cf13fc2ef3d8 = /*#__PURE__*/ (0, $gGDF1$react.forwardRef)(function SelectBoxGroup(props, ref) {
    [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $6a3953abb7deb063$export$cad91f7528e8dc08);
    let { children: children, selectionMode: selectionMode = 'single', orientation: orientation = 'vertical', isDisabled: isDisabled = false, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style, styles: styles, ...otherProps } = props;
    const selectBoxContextValue = (0, $gGDF1$react.useMemo)(()=>({
            orientation: orientation,
            isDisabled: isDisabled
        }), [
        orientation,
        isDisabled
    ]);
    return /*#__PURE__*/ (0, $gGDF1$reactjsxruntime.jsx)($6a3953abb7deb063$var$SelectBoxContext.Provider, {
        value: selectBoxContextValue,
        children: /*#__PURE__*/ (0, $gGDF1$reactjsxruntime.jsx)((0, $gGDF1$reactariacomponents.ListBox), {
            selectionMode: selectionMode,
            layout: "grid",
            orientation: orientation,
            className: (UNSAFE_className || '') + $6a3953abb7deb063$var$gridStyles({
                orientation: orientation
            }, styles),
            style: UNSAFE_style,
            ...otherProps,
            children: children
        })
    });
});


//# sourceMappingURL=SelectBoxGroup.cjs.map
