require("./Menu.css");
var $af04e099a53d3e85$exports = require("./Checkbox.cjs");
var $e991cbcdf82ced71$exports = require("./CenterBaseline.cjs");
var $dba2b18fc5727f9b$exports = require("./Checkmark.cjs");
var $1df9f1c9262ce5df$exports = require("./Chevron.cjs");
var $2d04acb918636de0$exports = require("./Divider.cjs");
var $6367bc87eb7d24ad$exports = require("./Content.cjs");
var $bde97c91243ed164$exports = require("../icons/Icon.cjs");
var $053b76ed3d29e13b$exports = require("./Image.cjs");
var $0ed6e07b499b9797$exports = require("../icons/InfoCircle.cjs");
var $493371ef39bf7a55$exports = require("./Popover.cjs");
var $4526404114e78c80$exports = require("./intlStrings.cjs");
var $377d9a1b51957cfd$exports = require("./LinkOut.cjs");
var $308b180f49d82d28$exports = require("../icons/runtime.cjs");
var $2061c83559b50a66$exports = require("./pressScale.cjs");
var $ac757a4c2bd72aee$exports = require("../icons/useSpectrumContextProps.cjs");
var $4tP7K$reactjsxruntime = require("react/jsx-runtime");
var $4tP7K$reactariacomponents = require("react-aria-components");
var $4tP7K$react = require("react");
var $4tP7K$reactaria = require("react-aria");
var $4tP7K$reactariainteractions = require("@react-aria/interactions");
var $4tP7K$reactariautils = require("@react-aria/utils");
var $4tP7K$reactariai18n = require("@react-aria/i18n");


function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}

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

$parcel$export(module.exports, "MenuContext", () => $e741ea6b88ce4866$export$c7e742effb1c51e2);
$parcel$export(module.exports, "sectionHeader", () => $e741ea6b88ce4866$export$562e61a0817eb32e);
$parcel$export(module.exports, "sectionHeading", () => $e741ea6b88ce4866$export$300ac6f106ef584d);
$parcel$export(module.exports, "menuitem", () => $e741ea6b88ce4866$export$f68e44d881264486);
$parcel$export(module.exports, "checkmark", () => $e741ea6b88ce4866$export$292abbf31ed842a);
$parcel$export(module.exports, "checkbox", () => $e741ea6b88ce4866$export$b07e517d22efa1ca);
$parcel$export(module.exports, "icon", () => $e741ea6b88ce4866$export$1ca1ec8b29a4ce27);
$parcel$export(module.exports, "iconCenterWrapper", () => $e741ea6b88ce4866$export$31d1842a0fd736e6);
$parcel$export(module.exports, "label", () => $e741ea6b88ce4866$export$1237798dc640739a);
$parcel$export(module.exports, "description", () => $e741ea6b88ce4866$export$6d59db4903f20f7d);
$parcel$export(module.exports, "Menu", () => $e741ea6b88ce4866$export$d9b273488cd8ce6f);
$parcel$export(module.exports, "MenuSection", () => $e741ea6b88ce4866$export$4b1545b4f2016d26);
$parcel$export(module.exports, "MenuItem", () => $e741ea6b88ce4866$export$2ce376c2cc3355c8);
$parcel$export(module.exports, "MenuTrigger", () => $e741ea6b88ce4866$export$27d2ad3c5815583e);
$parcel$export(module.exports, "SubmenuTrigger", () => $e741ea6b88ce4866$export$ecabc99eeffab7ca);
$parcel$export(module.exports, "UnavailableMenuItemTrigger", () => $e741ea6b88ce4866$export$7c4f7fdc3a164ef);
/*
 * 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 $e741ea6b88ce4866$export$c7e742effb1c51e2 = /*#__PURE__*/ (0, $4tP7K$react.createContext)(null);
const $e741ea6b88ce4866$var$menuItemGrid = {
    size: {
        S: [
            "calc(1.5rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(1.5rem * 3 / 8)"
        ],
        M: [
            "calc(2rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(2rem * 3 / 8)"
        ],
        L: [
            "calc(2.5rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(2.5rem * 3 / 8)"
        ],
        XL: [
            "calc(3rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(3rem * 3 / 8)"
        ]
    }
};
let $e741ea6b88ce4866$export$b1e5508a851be14d = function anonymous(props, overrides) {
    let rules = " ";
    let width = false;
    let maxWidth = false;
    let matches = String(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] === "Z") width = true;
        if (p[1] === "L") maxWidth = true;
        rules += p[0];
    }
    rules += ' _Le12';
    rules += ' se12';
    if (props.size === "XL") rules += ' Dk92HIe12';
    else if (props.size === "L") rules += ' DyaX9Fb12';
    else if (props.size === "M") rules += ' Deb5jcb12';
    else if (props.size === "S") rules += ' DGTLJAe12';
    rules += ' _oa12';
    rules += ' K40ub4c12';
    if (!width) rules += ' Za12';
    if (props.isPopover) rules += ' _Na12';
    if (props.isPopover) rules += ' Pa12';
    if (props.isPopover) {
        if (!maxWidth) rules += ' Lh12';
    }
    if (props.isPopover) rules += ' Tt12';
    if (props.isPopover) rules += ' Qt12';
    if (props.isPopover) rules += ' St12';
    if (props.isPopover) rules += ' Rt12';
    rules += ' uk12';
    rules += ' ucJ9TBTb12';
    rules += ' ud3Euai12';
    rules += ' uea12';
    rules += ' ugb12';
    rules += ' uhd12';
    rules += ' uje12';
    rules += ' u2NhKxcl12';
    rules += ' uic12';
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    }
    rules += ' __ya12';
    return rules;
};
let $e741ea6b88ce4866$export$fe2e36411d703b3d = function anonymous(props) {
    let rules = " ";
    rules += ' z2mU12';
    rules += ' yzZKy12';
    rules += ' eb12';
    rules += ' se12';
    rules += ' CcAc39c12';
    if (props.size === "XL") rules += ' Dk92HIe12';
    else if (props.size === "L") rules += ' DyaX9Fb12';
    else if (props.size === "M") rules += ' Deb5jcb12';
    else if (props.size === "S") rules += ' DGTLJAe12';
    return rules;
};
let $e741ea6b88ce4866$export$562e61a0817eb32e = function anonymous(props) {
    let rules = " ";
    rules += ' pt12';
    rules += ' z3mU12';
    rules += ' yAZKy12';
    rules += ' _oa12';
    rules += ' MAyFGYc12';
    rules += ' Tu7Fubd12';
    rules += ' Qu7Fubd12';
    if (props.size === "XL") rules += ' -M_-Mk12';
    else if (props.size === "L") rules += ' -M_-Mh12';
    else if (props.size === "S") rules += ' -M_-Mg12';
    else if (props.size === "XS") rules += ' -M_-Mf12';
    else rules += ' -M_-Mi12';
    return rules;
};
let $e741ea6b88ce4866$export$300ac6f106ef584d = " uk12 ucJ9TBTb12 ud3Euai12 uea12 ugb12 uhd12 uje12 u2NhKxcl12 uic12 -_6BNtrc-c12 vx12 xd12 _xa12 xX0cczbc12 _xX0cczba12 _Fd12 _FnuYUweb12 pt12 Jy12 Gy12 Iy12 Hy12";
let $e741ea6b88ce4866$export$f68e44d881264486 = function anonymous(props, overrides) {
    let rules = " ";
    let minWidth = false;
    let position = false;
    let gridColumnStart = false;
    let gridColumnEnd = false;
    let matches = String(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] === "N") minWidth = true;
        if (p[1] === "_P") position = true;
        if (p[1] === "z") gridColumnStart = true;
        if (p[1] === "y") gridColumnEnd = true;
        rules += p[0];
    }
    if (props.isFocusVisible) rules += ' _Lf12';
    else rules += ' _Le12';
    rules += ' Oh12';
    rules += ' Olc12';
    rules += ' _Mc12';
    rules += ' _Kd12';
    if (props.size === "XL") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "L") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "S") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "XS") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    }
    if (props.size === "XL") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "L") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "S") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "XS") {
        rules += ' xb12';
        rules += ' _xa12';
    } else {
        rules += ' xb12';
        rules += ' _xa12';
    }
    if (props.size === "XL") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "L") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "S") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "XS") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    }
    if (props.isDisabled) {
        rules += ' pp12';
        rules += ' plc12';
    } else {
        if (props.isPressed) rules += ' po12';
        else if (props.isFocusVisible) rules += ' po12';
        else if (props.isHovered) rules += ' po12';
        else rules += ' pt12';
        if (props.isFocused) rules += ' ple12';
        else rules += ' plb12';
    }
    rules += ' se12';
    rules += ' ea12';
    rules += ' egLWx3bb12';
    rules += ' _oa12';
    rules += ' Sd12';
    rules += ' Rd12';
    if (props.size === "XL") {
        if (!minWidth) rules += ' Nl12';
    } else if (props.size === "L") {
        if (!minWidth) rules += ' Nj12';
    } else if (props.size === "S") {
        if (!minWidth) rules += ' Nf12';
    } else if (props.size === "XS") {
        if (!minWidth) rules += ' Ne12';
    } else if (!minWidth) rules += ' Nk12';
    if (props.size === "XL") rules += ' -SFnbic-_JaP8ec12';
    else if (props.size === "L") rules += ' -SFnbic-_J0K2hn12';
    else if (props.size === "S") rules += ' -SFnbic-_JJOW22b12';
    else if (props.size === "XS") rules += ' -SFnbic-_JICefdd12';
    else rules += ' -SFnbic-_Jb12';
    rules += ' -Bu7z1c-ob12';
    rules += ' oj12';
    rules += ' nj12';
    rules += ' kj12';
    rules += ' jj12';
    rules += ' qh12';
    rules += ' -Qg41Lb-IAxCW0c12';
    rules += ' -Qg41Lb-gLWx3bIy12';
    rules += ' MAyFGYc12';
    rules += ' Td12';
    rules += ' QAzEcG12';
    rules += ' -aRvJDd-Tu7Fubd12';
    if (props.isFocused) {
        rules += ' gF12';
        rules += ' gle12';
    } else rules += ' g912';
    if (!position) rules += ' _Pc12';
    if (!gridColumnStart) rules += ' z2mU12';
    if (!gridColumnEnd) rules += ' yzZKy12';
    rules += ' CcAc39c12';
    rules += ' DLwlgod12';
    rules += ' EpvfBwb12';
    rules += ' EDNKd2dZQmDFe12';
    rules += ' UDNKd2dai5a012';
    rules += ' FF12';
    rules += ' _Xa12';
    if (props.isLink) rules += ' ry12';
    else rules += ' ri12';
    rules += ' Yd12';
    rules += ' Xb12';
    rules += ' _2b12';
    rules += ' _yb12';
    if (props.size === "XL") rules += ' -M_-Mk12';
    else if (props.size === "L") rules += ' -M_-Mh12';
    else if (props.size === "S") rules += ' -M_-Mg12';
    else if (props.size === "XS") rules += ' -M_-Mf12';
    else rules += ' -M_-Mi12';
    return rules;
};
let $e741ea6b88ce4866$export$292abbf31ed842a = function anonymous(props) {
    let rules = " ";
    if (props.isSelected) rules += ' _6c12';
    else rules += ' _6b12';
    rules += ' z2CW8rb12';
    rules += ' y2CW8rb12';
    rules += ' B2CW8rb12';
    rules += ' A2CW8rb12';
    if (props.isPressed) rules += ' ps12';
    else if (props.isFocusVisible) rules += ' ps12';
    else if (props.isHovered) rules += ' ps12';
    else rules += ' pu12';
    rules += ' -_8sjo0b-t5ZbAob12';
    if (props.isFocused) rules += ' -_8sjo0b-lt8pvGJ12';
    else rules += ' -_8sjo0b-lta12';
    rules += ' Hw12';
    rules += ' fa12';
    return rules;
};
let $e741ea6b88ce4866$export$b07e517d22efa1ca = " z2CW8rb12 y2CW8rb12 B2CW8rb12 A2CW8rb12 Hw12";
let $e741ea6b88ce4866$export$1ca1ec8b29a4ce27 = " sb12 ZuUmpre12 FuUmpre12 Ht12 Hsu12 -_8sjo0b-t5ZbAob12";
let $e741ea6b88ce4866$export$31d1842a0fd736e6 = " sd12 z2U5Crc12 y2U5Crc12 B2U5Crc12 A2U5Crc12";
let $e741ea6b88ce4866$var$image = function anonymous(props) {
    let rules = " ";
    rules += ' z2U5Crc12';
    rules += ' y2U5Crc12';
    rules += ' B2U5Crc12';
    rules += ' AvoofG12';
    rules += ' Ht12';
    rules += ' Hsu12';
    rules += ' Jt12';
    rules += ' _dc12';
    rules += ' oa12';
    rules += ' na12';
    rules += ' ka12';
    rules += ' ja12';
    if (props.size === "XL") rules += ' ZF12';
    else if (props.size === "L") rules += ' Zx12';
    else if (props.size === "M") rules += ' Zw12';
    else if (props.size === "S") rules += ' ZC12';
    else rules += ' Zw12';
    if (props.size === "XL") rules += ' Fz12';
    else if (props.size === "L") rules += ' Fw12';
    else if (props.size === "M") rules += ' Fv12';
    else if (props.size === "S") rules += ' Fx12';
    else rules += ' Fv12';
    rules += ' fa12';
    rules += ' _Ha12';
    return rules;
};
let $e741ea6b88ce4866$export$1237798dc640739a = function anonymous(props) {
    let rules = " ";
    rules += ' zv6x9r12';
    rules += ' yv6x9r12';
    rules += ' Bv6x9r12';
    rules += ' Av6x9r12';
    if (props.size === "XL") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "L") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "S") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "XS") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    }
    rules += ' xc12';
    rules += ' _xa12';
    if (props.size === "XL") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "L") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "S") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "XS") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    }
    rules += ' p40ub4c12';
    rules += ' JAzEcG12';
    return rules;
};
let $e741ea6b88ce4866$export$6d59db4903f20f7d = function anonymous(props) {
    let rules = " ";
    rules += ' z9u7zPc12';
    rules += ' y9u7zPc12';
    rules += ' B9u7zPc12';
    rules += ' A9u7zPc12';
    if (props.size === "XL") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "L") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "M") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "S") {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else {
        rules += ' uk12';
        rules += ' ucJ9TBTb12';
        rules += ' ud3Euai12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    } else if (props.size === "M") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    }
    if (props.size === "XL") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "L") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "M") {
        rules += ' xb12';
        rules += ' _xa12';
    } else if (props.size === "S") {
        rules += ' xb12';
        rules += ' _xa12';
    } else {
        rules += ' xb12';
        rules += ' _xa12';
    }
    if (props.size === "XL") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "L") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "M") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "S") {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    } else {
        rules += ' _Fd12';
        rules += ' _FnuYUweb12';
    }
    if (props.isDisabled) rules += ' pp12';
    else if (props.isFocused) rules += ' pt12';
    else {
        if (props.isPressed) rules += ' pt12';
        else if (props.isFocusVisible) rules += ' pt12';
        else if (props.isHovered) rules += ' pt12';
        else rules += ' pv12';
    }
    rules += ' Yd12';
    rules += ' Xb12';
    rules += ' _2b12';
    return rules;
};
let $e741ea6b88ce4866$var$value = " z8bmXs12 y8bmXs12 B8bmXs12 A8bmXs12 Iv12";
let $e741ea6b88ce4866$var$keyboard = function anonymous(props) {
    let rules = " ";
    rules += ' z45MTAd12';
    rules += ' y45MTAd12';
    rules += ' B45MTAd12';
    rules += ' A45MTAd12';
    rules += ' Iv12';
    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';
    else rules += ' pn12';
    if (props.isDisabled) rules += ' plc12';
    rules += ' _Wb12';
    rules += ' _3f12';
    return rules;
};
let $e741ea6b88ce4866$var$descriptor = " z0cdLvd12 y0cdLvd12 B0cdLvd12 A0cdLvd12 _dd12 __Ac12 Iv12 -_8sjo0b-t5ZbAob12";
let $e741ea6b88ce4866$var$descriptorIcon = function anonymous(props) {
    let rules = " ";
    rules += ' Hy12';
    rules += ' sb12';
    if (props.size === "XL") rules += ' Zp12';
    else if (props.size === "L") rules += ' Zo12';
    else if (props.size === "M") rules += ' Zm12';
    else if (props.size === "S") rules += ' Zu12';
    if (props.size === "XL") rules += ' Fq12';
    else if (props.size === "L") rules += ' Fp12';
    else if (props.size === "M") rules += ' Fn12';
    else if (props.size === "S") rules += ' Ft12';
    return rules;
};
let $e741ea6b88ce4866$var$InternalMenuContext = /*#__PURE__*/ (0, $4tP7K$react.createContext)({
    size: 'M',
    isSubmenu: false,
    hideLinkOutIcon: false
});
let $e741ea6b88ce4866$var$InternalMenuTriggerContext = /*#__PURE__*/ (0, $4tP7K$react.createContext)(null);
let $e741ea6b88ce4866$var$UnavailableContext = /*#__PURE__*/ (0, $4tP7K$react.createContext)(false);
let $e741ea6b88ce4866$var$wrappingDiv = " sd12 Za12 Fb12";
const $e741ea6b88ce4866$export$d9b273488cd8ce6f = /*#__PURE__*/ (0, $4tP7K$react.forwardRef)(function Menu(props, ref) {
    [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $e741ea6b88ce4866$export$c7e742effb1c51e2);
    let { isSubmenu: isSubmenu, size: ctxSize } = (0, $4tP7K$react.useContext)($e741ea6b88ce4866$var$InternalMenuContext);
    let { children: children, size: size = ctxSize, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className, styles: styles, hideLinkOutIcon: hideLinkOutIcon = false } = props;
    let ctx = (0, $4tP7K$react.useContext)($e741ea6b88ce4866$var$InternalMenuTriggerContext);
    let inPopover = (0, $4tP7K$react.useContext)((0, $493371ef39bf7a55$exports.InPopoverContext));
    let isPopover = (ctx || isSubmenu) && !inPopover;
    let content = /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)($e741ea6b88ce4866$var$InternalMenuContext.Provider, {
        value: {
            size: size,
            isSubmenu: true,
            hideLinkOutIcon: hideLinkOutIcon
        },
        children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactariacomponents.Provider), {
            values: [
                [
                    (0, $6367bc87eb7d24ad$exports.HeaderContext),
                    {
                        styles: $e741ea6b88ce4866$export$562e61a0817eb32e({
                            size: size
                        })
                    }
                ],
                [
                    (0, $6367bc87eb7d24ad$exports.HeadingContext),
                    {
                        // @ts-ignore
                        role: 'presentation',
                        styles: $e741ea6b88ce4866$export$300ac6f106ef584d
                    }
                ],
                [
                    (0, $6367bc87eb7d24ad$exports.TextContext),
                    {
                        slots: {
                            'description': {
                                styles: $e741ea6b88ce4866$export$6d59db4903f20f7d({
                                    size: size
                                })
                            }
                        }
                    }
                ],
                [
                    (0, $493371ef39bf7a55$exports.InPopoverContext),
                    false
                ]
            ],
            children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactariacomponents.Menu), {
                ...props,
                className: $e741ea6b88ce4866$export$b1e5508a851be14d({
                    size: size,
                    isPopover: isPopover
                }, isPopover ? null : styles),
                children: children
            })
        })
    });
    if (isPopover) return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $493371ef39bf7a55$exports.Popover), {
        ref: ref,
        padding: "none",
        hideArrow: true,
        children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)("div", {
            style: UNSAFE_style,
            className: (UNSAFE_className || '') + $e741ea6b88ce4866$var$wrappingDiv,
            children: content
        })
    });
    return content;
});
function $e741ea6b88ce4866$export$2e0a83ec2e27ecbb(props) {
    return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactariacomponents.Separator), {
        ...props,
        className: (0, $308b180f49d82d28$exports.mergeStyles)((0, $2d04acb918636de0$exports.divider)({
            size: 'M',
            orientation: 'horizontal',
            isStaticColor: false
        }), " se12 skk12 z3mU12 yAZKy12 JydxGIe12 GydxGIe12")
    });
}
function $e741ea6b88ce4866$export$4b1545b4f2016d26(props) {
    // remember, context doesn't work if it's around Section nor inside
    let { size: size } = (0, $4tP7K$react.useContext)($e741ea6b88ce4866$var$InternalMenuContext);
    return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsxs)((0, $4tP7K$reactjsxruntime.Fragment), {
        children: [
            /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactariacomponents.MenuSection), {
                ...props,
                className: $e741ea6b88ce4866$export$fe2e36411d703b3d({
                    size: size
                }),
                children: props.children
            }),
            /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)($e741ea6b88ce4866$export$2e0a83ec2e27ecbb, {})
        ]
    });
}
const $e741ea6b88ce4866$var$checkmarkIconSize = {
    S: 'XS',
    M: 'M',
    L: 'L',
    XL: 'XL'
};
const $e741ea6b88ce4866$var$linkIconSize = {
    S: 'M',
    M: 'L',
    L: 'XL',
    XL: 'XL'
};
function $e741ea6b88ce4866$var$UnavailableIconWrapper(props1) {
    let { direction: direction, size: size, id: id } = props1;
    let stringFormatter = (0, $4tP7K$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($4526404114e78c80$exports))), '@react-spectrum/s2');
    return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)("div", {
        slot: "descriptor",
        className: (0, $308b180f49d82d28$exports.mergeStyles)($e741ea6b88ce4866$var$descriptor, " Gy3v5sb12"),
        id: id,
        children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactariacomponents.Provider), {
            values: [
                [
                    (0, $bde97c91243ed164$exports.IconContext),
                    {
                        slots: {
                            icon: {
                                styles: $e741ea6b88ce4866$var$descriptorIcon({
                                    size: size
                                })
                            }
                        }
                    }
                ]
            ],
            children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $0ed6e07b499b9797$exports.default), {
                "aria-label": stringFormatter.format('menu.unavailable'),
                className: function anonymous(props) {
                    let rules = " ";
                    if (props.direction === "rtl") {
                        rules += ' -Z4Pn4c-a12';
                        rules += ' __Ha12';
                    }
                    return rules;
                }({
                    direction: direction
                })
            })
        })
    });
}
function $e741ea6b88ce4866$export$2ce376c2cc3355c8(props1) {
    let ref = (0, $4tP7K$react.useRef)(null);
    let isLink = props1.href != null;
    let isLinkOut = isLink && props1.target === '_blank';
    let { size: size, hideLinkOutIcon: hideLinkOutIcon } = (0, $4tP7K$react.useContext)($e741ea6b88ce4866$var$InternalMenuContext);
    let textValue = props1.textValue || (typeof props1.children === 'string' ? props1.children : undefined);
    let { direction: direction } = (0, $4tP7K$reactaria.useLocale)();
    let isUnavailable = (0, $4tP7K$react.useContext)($e741ea6b88ce4866$var$UnavailableContext);
    let infoIconId = (0, $4tP7K$reactariautils.useId)();
    return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactariacomponents.MenuItem), {
        ...props1,
        "aria-describedby": isUnavailable ? infoIconId : undefined,
        textValue: textValue,
        ref: ref,
        style: (0, $2061c83559b50a66$exports.pressScale)(ref, props1.UNSAFE_style),
        className: (renderProps)=>(props1.UNSAFE_className || '') + $e741ea6b88ce4866$export$f68e44d881264486({
                ...renderProps,
                isFocused: renderProps.hasSubmenu && renderProps.isOpen || renderProps.isFocused,
                size: size,
                isLink: isLink
            }, props1.styles),
        children: (renderProps)=>{
            let { children: children } = props1;
            let checkboxRenderProps = {
                ...renderProps,
                size: size,
                isFocused: false,
                isFocusVisible: false,
                isIndeterminate: false,
                isReadOnly: false,
                isInvalid: false,
                isRequired: false
            };
            return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactjsxruntime.Fragment), {
                children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsxs)((0, $4tP7K$reactariacomponents.Provider), {
                    values: [
                        [
                            (0, $bde97c91243ed164$exports.IconContext),
                            {
                                slots: {
                                    icon: {
                                        render: (0, $e991cbcdf82ced71$exports.centerBaseline)({
                                            slot: 'icon',
                                            styles: $e741ea6b88ce4866$export$31d1842a0fd736e6
                                        }),
                                        styles: $e741ea6b88ce4866$export$1ca1ec8b29a4ce27
                                    },
                                    descriptor: {
                                        render: (0, $e991cbcdf82ced71$exports.centerBaseline)({
                                            slot: 'descriptor',
                                            styles: $e741ea6b88ce4866$var$descriptor
                                        })
                                    } // TODO: remove once we have default?
                                }
                            }
                        ],
                        [
                            (0, $6367bc87eb7d24ad$exports.TextContext),
                            {
                                slots: {
                                    [(0, $4tP7K$reactariacomponents.DEFAULT_SLOT)]: {
                                        styles: $e741ea6b88ce4866$export$1237798dc640739a({
                                            size: size
                                        })
                                    },
                                    label: {
                                        styles: $e741ea6b88ce4866$export$1237798dc640739a({
                                            size: size
                                        })
                                    },
                                    description: {
                                        styles: $e741ea6b88ce4866$export$6d59db4903f20f7d({
                                            ...renderProps,
                                            size: size
                                        })
                                    },
                                    value: {
                                        styles: $e741ea6b88ce4866$var$value
                                    }
                                }
                            }
                        ],
                        [
                            (0, $6367bc87eb7d24ad$exports.KeyboardContext),
                            {
                                styles: $e741ea6b88ce4866$var$keyboard({
                                    size: size,
                                    isDisabled: renderProps.isDisabled
                                })
                            }
                        ],
                        [
                            (0, $053b76ed3d29e13b$exports.ImageContext),
                            {
                                styles: $e741ea6b88ce4866$var$image({
                                    size: size
                                })
                            }
                        ]
                    ],
                    children: [
                        renderProps.selectionMode === 'single' && !renderProps.hasSubmenu && /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $dba2b18fc5727f9b$exports.default), {
                            size: $e741ea6b88ce4866$var$checkmarkIconSize[size],
                            className: $e741ea6b88ce4866$export$292abbf31ed842a({
                                ...renderProps,
                                size: size
                            })
                        }),
                        renderProps.selectionMode === 'multiple' && !renderProps.hasSubmenu && /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)("div", {
                            className: (0, $308b180f49d82d28$exports.mergeStyles)($e741ea6b88ce4866$export$b07e517d22efa1ca, (0, $af04e099a53d3e85$exports.box)(checkboxRenderProps)),
                            children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $dba2b18fc5727f9b$exports.default), {
                                size: size,
                                className: (0, $af04e099a53d3e85$exports.iconStyles)
                            })
                        }),
                        typeof children === 'string' ? /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $6367bc87eb7d24ad$exports.Text), {
                            slot: "label",
                            children: children
                        }) : children,
                        isLinkOut && !hideLinkOutIcon && /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)("div", {
                            slot: "descriptor",
                            className: $e741ea6b88ce4866$var$descriptor,
                            children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $377d9a1b51957cfd$exports.default), {
                                size: $e741ea6b88ce4866$var$linkIconSize[size],
                                className: function anonymous(props) {
                                    let rules = " ";
                                    if (props.direction === "rtl") {
                                        rules += ' -Z4Pn4c-a12';
                                        rules += ' __Ha12';
                                    }
                                    return rules;
                                }({
                                    direction: direction
                                })
                            })
                        }),
                        renderProps.hasSubmenu && (isUnavailable ? /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)($e741ea6b88ce4866$var$UnavailableIconWrapper, {
                            direction: direction,
                            size: size,
                            id: infoIconId
                        }) : /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)("div", {
                            slot: "descriptor",
                            className: $e741ea6b88ce4866$var$descriptor,
                            children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $1df9f1c9262ce5df$exports.default), {
                                size: size,
                                className: function anonymous(props) {
                                    let rules = " ";
                                    if (props.direction === "rtl") {
                                        rules += ' -Z4Pn4c-a12';
                                        rules += ' __Ha12';
                                    }
                                    return rules;
                                }({
                                    direction: direction
                                })
                            })
                        }))
                    ]
                })
            });
        }
    });
}
/**
 * The MenuTrigger serves as a wrapper around a Menu and its associated trigger,
 * linking the Menu's open state with the trigger's press state.
 */ function $e741ea6b88ce4866$export$27d2ad3c5815583e(props) {
    // RAC sets isPressed via PressResponder when the menu is open.
    // We don't want press scaling to appear to get "stuck", so override this.
    // For mouse interactions, menus open on press start. When the popover underlay appears
    // it covers the trigger button, causing onPressEnd to fire immediately and no press scaling
    // to occur. We override this by listening for pointerup on the document ourselves.
    let [isPressed, setPressed] = (0, $4tP7K$react.useState)(false);
    let { addGlobalListener: addGlobalListener } = (0, $4tP7K$reactariautils.useGlobalListeners)();
    let onPressStart = (e)=>{
        if (e.pointerType !== 'mouse') return;
        setPressed(true);
        addGlobalListener(document, 'pointerup', ()=>{
            setPressed(false);
        }, {
            once: true,
            capture: true
        });
    };
    let { align: align = 'start', direction: direction = 'bottom', shouldFlip: shouldFlip } = props;
    let placement;
    switch(direction){
        case 'left':
        case 'right':
        case 'start':
        case 'end':
            placement = `${direction} ${align === 'end' ? 'bottom' : 'top'}`;
            break;
        case 'bottom':
        case 'top':
        default:
            placement = `${direction} ${align}`;
    }
    return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)($e741ea6b88ce4866$var$InternalMenuTriggerContext.Provider, {
        value: {
            align: props.align,
            direction: props.direction,
            shouldFlip: props.shouldFlip
        },
        children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $493371ef39bf7a55$exports.PopoverContext).Provider, {
            value: {
                hideArrow: true,
                offset: 8,
                crossOffset: 0,
                placement: placement,
                shouldFlip: shouldFlip
            },
            children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $493371ef39bf7a55$exports.InPopoverContext).Provider, {
                value: false,
                children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactariacomponents.MenuTrigger), {
                    ...props,
                    children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $4tP7K$reactariainteractions.PressResponder), {
                        onPressStart: onPressStart,
                        isPressed: isPressed,
                        children: props.children
                    })
                })
            })
        })
    });
}
function $e741ea6b88ce4866$export$ecabc99eeffab7ca(props) {
    // For submenus, the offset from the edge of the popover should be 10px.
    // Subtract 8px for the padding around the parent menu.
    // Offset by padding + border so that the first item in a submenu lines up with the parent menu item.
    return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsxs)((0, $4tP7K$reactariacomponents.SubmenuTrigger), {
        ...props,
        children: [
            props.children[0],
            /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $493371ef39bf7a55$exports.PopoverContext).Provider, {
                value: {
                    hideArrow: true,
                    offset: -2,
                    crossOffset: -8,
                    placement: 'end top'
                },
                children: props.children[1]
            })
        ]
    });
}
function $e741ea6b88ce4866$export$7c4f7fdc3a164ef(props) {
    let { isUnavailable: isUnavailable = false, children: children } = props;
    if (isUnavailable) return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)($e741ea6b88ce4866$var$UnavailableContext.Provider, {
        value: isUnavailable,
        children: /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsxs)((0, $4tP7K$reactariacomponents.SubmenuTrigger), {
            children: [
                children[0],
                /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)((0, $493371ef39bf7a55$exports.PopoverContext).Provider, {
                    value: {
                        hideArrow: true,
                        offset: -2,
                        crossOffset: -8,
                        placement: 'end top'
                    },
                    children: children[1]
                })
            ]
        })
    });
    return children[0];
}
function $e741ea6b88ce4866$export$aebfca372ec4a7db(props) {
    return /*#__PURE__*/ (0, $4tP7K$reactjsxruntime.jsx)("div", {});
}


//# sourceMappingURL=Menu.cjs.map
