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 += ' _pa11';
    else if (props.colorScheme === "light") rules += ' _pb11';
    else if (props.colorScheme === "light dark") rules += ' _pc11';
    else rules += ' _pN79Hzc11';
    rules += ' _Pa11';
    rules += ' Wr11';
    rules += ' _Er11';
    rules += ' Za11';
    rules += ' FKem6Ob11';
    rules += ' _Bb11';
    rules += ' g811';
    if (props.isExiting) rules += ' _Ia11';
    else if (props.isEntering) rules += ' _Ia11';
    rules += ' Yf11';
    if (props.isExiting) rules += ' Xa11';
    else rules += ' Xd11';
    rules += ' _2b11';
    return rules;
};
const $8e678305a8c10028$var$modalWrapper = function anonymous(props) {
    let rules = " ";
    rules += ' _Pe11';
    rules += ' Wr11';
    rules += ' _Er11';
    rules += ' Za11';
    rules += ' FE9bXU11';
    rules += ' sd11';
    if (props.size === "fullscreenTakeover") rules += ' ed11';
    else rules += ' eb11';
    rules += ' _Ca11';
    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 += ' sd11';
                        rules += ' _ta11';
                        if (props.size === "fullscreenTakeover") rules += ' od11';
                        else rules += ' oe11';
                        if (props.size === "fullscreenTakeover") rules += ' nd11';
                        else rules += ' ne11';
                        if (props.size === "fullscreenTakeover") rules += ' kd11';
                        else rules += ' ke11';
                        if (props.size === "fullscreenTakeover") rules += ' jd11';
                        else rules += ' je11';
                        if (props.size === "fullscreenTakeover") rules += ' Za11';
                        else if (props.size === "fullscreen") rules += ' ZGqsG7b11';
                        else if (props.size === "XL") rules += ' ZbRWaYd11';
                        else if (props.size === "L") rules += ' Zb4QY411';
                        else if (props.size === "M") rules += ' ZILqIYb11';
                        else if (props.size === "S") rules += ' ZA11';
                        if (props.size === "fullscreenTakeover") rules += ' Fb11';
                        else if (props.size === "fullscreen") rules += ' FGqsG7b11';
                        if (props.size === "fullscreenTakeover") rules += ' Lp11';
                        else if (props.size === "fullscreen") rules += ' Lp11';
                        else rules += ' Lc11';
                        if (props.size === "fullscreenTakeover") rules += ' Ki11';
                        else if (props.size === "fullscreen") rules += ' Ki11';
                        else rules += ' KjVOfn11';
                        if (props.size === "fullscreenTakeover") rules += ' QILlin11';
                        rules += ' -Ovbhqd-g_g11';
                        rules += ' gEzkoQe11';
                        if (props.isExiting) rules += ' _Ia11';
                        else if (props.isEntering) rules += ' _Ia11';
                        if (props.isEntering) {
                            rules += ' -_8PloMd-w11';
                            rules += ' __Ya11';
                        }
                        rules += ' YmenWad11';
                        if (props.isExiting) rules += ' Xa11';
                        else rules += ' Xd11';
                        rules += ' _2b11';
                        if (props.isExiting) rules += ' _1a11';
                        else rules += ' _1b11';
                        rules += ' _Lf11';
                        rules += ' _Mb11';
                        rules += ' Oj11';
                        return rules;
                    })({
                        ...renderProps,
                        size: props1.size
                    })
            })
        })
    });
});


//# sourceMappingURL=Modal.cjs.map
