require("./Modal.css");
var $914a06b3a1c679bc$exports = require("./Provider.cjs");
var $150382364eecc4bc$exports = require("./useDOMRef.cjs");
var $j6TWk$reactjsxruntime = require("react/jsx-runtime");
var $j6TWk$react = require("react");
var $j6TWk$reactariacomponentsModal = require("react-aria-components/Modal");
var $j6TWk$reactariaI18nProvider = require("react-aria/I18nProvider");


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 += ' -ICUGx-_pa12';
    else if (props.colorScheme === "light") rules += ' -ICUGx-_pb12';
    else if (props.colorScheme === "light dark") rules += ' -ICUGx-_pc12';
    rules += ' _pK8eoyd12';
    rules += ' _Pa12';
    rules += ' Wr12';
    rules += ' _Er12';
    rules += ' Za12';
    rules += ' FKem6Ob12';
    rules += ' _Bb12';
    rules += ' g812';
    if (props.isExiting) rules += ' _Ia12';
    else if (props.isEntering) rules += ' _Ia12';
    rules += ' Yf12';
    if (props.isExiting) rules += ' Xa12';
    else rules += ' Xd12';
    rules += ' _2b12';
    return rules;
};
const $8e678305a8c10028$var$modalWrapper = function anonymous(props) {
    let rules = " ";
    rules += ' _Pe12';
    rules += ' Wr12';
    rules += ' _Er12';
    rules += ' Za12';
    rules += ' FE9bXU12';
    rules += ' sd12';
    if (props.size === "fullscreenTakeover") rules += ' ed12';
    else rules += ' eb12';
    rules += ' _Ca12';
    return rules;
};
const $8e678305a8c10028$export$2b77a92f1a5ad772 = /*#__PURE__*/ (0, $j6TWk$react.forwardRef)(function Modal(props1, ref) {
    let domRef = (0, $150382364eecc4bc$exports.useDOMRef)(ref);
    let colorScheme = (0, $j6TWk$react.useContext)((0, $914a06b3a1c679bc$exports.ColorSchemeContext));
    let { locale: locale, direction: direction } = (0, $j6TWk$reactariaI18nProvider.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$reactariacomponentsModal.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$reactariacomponentsModal.Modal), {
                ...props1,
                ref: modalRef,
                className: (renderProps)=>(function anonymous(props) {
                        let rules = " ";
                        rules += ' sd12';
                        rules += ' _ta12';
                        if (props.size === "fullscreenTakeover") rules += ' od12';
                        else rules += ' oe12';
                        if (props.size === "fullscreenTakeover") rules += ' nd12';
                        else rules += ' ne12';
                        if (props.size === "fullscreenTakeover") rules += ' kd12';
                        else rules += ' ke12';
                        if (props.size === "fullscreenTakeover") rules += ' jd12';
                        else rules += ' je12';
                        if (props.size === "fullscreenTakeover") rules += ' Za12';
                        else if (props.size === "fullscreen") rules += ' ZGqsG7b12';
                        else if (props.size === "XL") rules += ' ZbRWaYd12';
                        else if (props.size === "L") rules += ' Zb4QY412';
                        else if (props.size === "M") rules += ' ZILqIYb12';
                        else if (props.size === "S") rules += ' ZA12';
                        if (props.size === "fullscreenTakeover") rules += ' Fb12';
                        else if (props.size === "fullscreen") rules += ' FGqsG7b12';
                        if (props.size === "fullscreenTakeover") rules += ' Lp12';
                        else if (props.size === "fullscreen") rules += ' Lp12';
                        else rules += ' Lc12';
                        if (props.size === "fullscreenTakeover") rules += ' Ki12';
                        else if (props.size === "fullscreen") rules += ' Ki12';
                        else rules += ' KjVOfn12';
                        if (props.size === "fullscreenTakeover") rules += ' QILlin12';
                        rules += ' -Ovbhqd-g_g12';
                        rules += ' gEzkoQe12';
                        if (props.isExiting) rules += ' _Ia12';
                        else if (props.isEntering) rules += ' _Ia12';
                        if (props.isEntering) {
                            rules += ' -_8PloMd-w12';
                            rules += ' __Ya12';
                        }
                        rules += ' YmenWad12';
                        if (props.isExiting) rules += ' Xa12';
                        else rules += ' Xd12';
                        rules += ' _2b12';
                        if (props.isExiting) rules += ' _1a12';
                        else rules += ' _1b12';
                        rules += ' _Lf12';
                        rules += ' _Mb12';
                        rules += ' Oj12';
                        return rules;
                    })({
                        ...renderProps,
                        size: props1.size
                    })
            })
        })
    });
});


//# sourceMappingURL=Modal.cjs.map
