require("./Modal.css");
var $914a06b3a1c679bc$exports = require("./Provider.cjs");
var $j6TWk$reactjsxruntime = require("react/jsx-runtime");
var $j6TWk$react = require("react");
var $j6TWk$reactariacomponents = require("react-aria-components");
var $j6TWk$reactspectrumutils = require("@react-spectrum/utils");


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

$parcel$export(module.exports, "Modal", () => $8e678305a8c10028$export$2b77a92f1a5ad772);
/*
 * 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 $8e678305a8c10028$var$modalOverlayStyles = function anonymous(props) {
    let rules = " ";
    if (props.colorScheme === "dark") rules += ' _pa1';
    else if (props.colorScheme === "light") rules += ' _pb1';
    else if (props.colorScheme === "light dark") rules += ' _pc1';
    else rules += ' _pN79Hzc1';
    rules += ' _Pa1';
    rules += ' Wr1';
    rules += ' _Er1';
    rules += ' Za1';
    rules += ' FKem6Ob1';
    rules += ' _Bb1';
    rules += ' g81';
    if (props.isExiting) rules += ' _Ia1';
    else if (props.isEntering) rules += ' _Ia1';
    rules += ' Yf1';
    if (props.isExiting) rules += ' Xa1';
    else rules += ' Xd1';
    rules += ' _2b1';
    return rules;
};
const $8e678305a8c10028$var$modalWrapper = function anonymous(props) {
    let rules = " ";
    rules += ' _Pe1';
    rules += ' Wr1';
    rules += ' _Er1';
    rules += ' Za1';
    rules += ' FE9bXU1';
    rules += ' sd1';
    if (props.size === "fullscreenTakeover") rules += ' ed1';
    else rules += ' eb1';
    rules += ' _Ca1';
    return rules;
};
const $8e678305a8c10028$export$2b77a92f1a5ad772 = /*#__PURE__*/ (0, $j6TWk$react.forwardRef)(function Modal(props1, ref) {
    let domRef = (0, $j6TWk$reactspectrumutils.useDOMRef)(ref);
    let colorScheme = (0, $j6TWk$react.useContext)((0, $914a06b3a1c679bc$exports.ColorSchemeContext));
    let { locale: locale, direction: direction } = (0, $j6TWk$reactariacomponents.useLocale)();
    // TODO: should we pass through lang and dir props in RAC?
    let modalRef = (0, $j6TWk$react.useCallback)((el)=>{
        domRef.current = el;
        if (el) {
            el.lang = locale;
            el.dir = direction;
        }
    }, [
        locale,
        direction,
        domRef
    ]);
    return /*#__PURE__*/ (0, $j6TWk$reactjsxruntime.jsx)((0, $j6TWk$reactariacomponents.ModalOverlay), {
        ...props1,
        className: (renderProps)=>$8e678305a8c10028$var$modalOverlayStyles({
                ...renderProps,
                colorScheme: colorScheme
            }),
        children: /*#__PURE__*/ (0, $j6TWk$reactjsxruntime.jsx)("div", {
            className: $8e678305a8c10028$var$modalWrapper({
                size: props1.size
            }),
            style: {
                containerType: 'size'
            },
            children: /*#__PURE__*/ (0, $j6TWk$reactjsxruntime.jsx)((0, $j6TWk$reactariacomponents.Modal), {
                ...props1,
                ref: modalRef,
                className: (renderProps)=>(function anonymous(props) {
                        let rules = " ";
                        rules += ' sd1';
                        rules += ' _ta1';
                        if (props.size === "fullscreenTakeover") rules += ' od1';
                        else rules += ' oe1';
                        if (props.size === "fullscreenTakeover") rules += ' nd1';
                        else rules += ' ne1';
                        if (props.size === "fullscreenTakeover") rules += ' kd1';
                        else rules += ' ke1';
                        if (props.size === "fullscreenTakeover") rules += ' jd1';
                        else rules += ' je1';
                        if (props.size === "fullscreenTakeover") rules += ' Za1';
                        else if (props.size === "fullscreen") rules += ' ZGqsG7b1';
                        else if (props.size === "XL") rules += ' ZbRWaYd1';
                        else if (props.size === "L") rules += ' Zb4QY41';
                        else if (props.size === "M") rules += ' ZILqIYb1';
                        else if (props.size === "S") rules += ' ZA1';
                        if (props.size === "fullscreenTakeover") rules += ' Fb1';
                        else if (props.size === "fullscreen") rules += ' FGqsG7b1';
                        if (props.size === "fullscreenTakeover") rules += ' Lp1';
                        else if (props.size === "fullscreen") rules += ' Lp1';
                        else rules += ' Lc1';
                        if (props.size === "fullscreenTakeover") rules += ' Ki1';
                        else if (props.size === "fullscreen") rules += ' Ki1';
                        else rules += ' KjVOfn1';
                        if (props.size === "fullscreenTakeover") rules += ' QILlin1';
                        rules += ' -Ovbhqd-g_g1';
                        rules += ' gEzkoQe1';
                        if (props.isExiting) rules += ' _Ia1';
                        else if (props.isEntering) rules += ' _Ia1';
                        if (props.isEntering) {
                            rules += ' -_8PloMd-w1';
                            rules += ' __Ya1';
                        }
                        rules += ' YmenWad1';
                        if (props.isExiting) rules += ' Xa1';
                        else rules += ' Xd1';
                        rules += ' _2b1';
                        if (props.isExiting) rules += ' _1a1';
                        else rules += ' _1b1';
                        rules += ' _Lf1';
                        rules += ' _Mb1';
                        rules += ' Oj1';
                        return rules;
                    })({
                        ...renderProps,
                        size: props1.size
                    })
            })
        })
    });
});


//# sourceMappingURL=Modal.cjs.map
