require("./DropZone.css");
var $55f1b8940d3e02db$exports = require("./IllustratedMessage.cjs");
var $4526404114e78c80$exports = require("./intlStrings.cjs");
var $ac757a4c2bd72aee$exports = require("../icons/useSpectrumContextProps.cjs");
var $faaBC$reactjsxruntime = require("react/jsx-runtime");
var $faaBC$reactariacomponents = require("react-aria-components");
var $faaBC$react = require("react");
var $faaBC$reactspectrumutils = require("@react-spectrum/utils");
var $faaBC$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, "DropZoneContext", () => $797cda10ca96fc86$export$14a72053295ff9a6);
$parcel$export(module.exports, "DropZone", () => $797cda10ca96fc86$export$3c6489d84dc98b6);
/*
 * 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 $797cda10ca96fc86$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $faaBC$react.createContext)(null);
const $797cda10ca96fc86$var$dropzone = function anonymous(props, overrides) {
    let rules = " ";
    let position = 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|F|M|K)[^\s]+/g);
    for (let p of matches){
        if (p[1] === "_P") position = true;
        rules += p[0];
    }
    rules += ' sd1';
    rules += ' _Ca1';
    rules += ' eb1';
    if (!position) rules += ' _Pc1';
    rules += ' uk1';
    rules += ' ucJ9TBTb1';
    rules += ' ud3Euai1';
    rules += ' uea1';
    rules += ' ugb1';
    rules += ' uhd1';
    rules += ' uje1';
    rules += ' u2NhKxcl1';
    rules += ' uic1';
    rules += ' po1';
    if (props.isDropTarget) rules += ' _jf1';
    else rules += ' _ja1';
    if (props.isDropTarget) rules += ' g_e1';
    rules += ' _kc1';
    rules += ' hc1';
    rules += ' mc1';
    rules += ' lc1';
    if (props.isFocusVisible) rules += ' ix1';
    else if (props.isDropTarget) rules += ' ix1';
    else rules += ' iq1';
    rules += ' oc1';
    rules += ' nc1';
    rules += ' kc1';
    rules += ' jc1';
    rules += ' Th1';
    rules += ' Qh1';
    rules += ' Sh1';
    rules += ' Rh1';
    rules += ' _oa1';
    return rules;
};
const $797cda10ca96fc86$var$banner = function anonymous(props) {
    let rules = " ";
    rules += ' _Pa1';
    rules += ' _Er1';
    rules += ' _Rr1';
    rules += ' IM1';
    rules += ' HM1';
    rules += ' sd1';
    rules += ' eb1';
    rules += ' _Ca1';
    rules += ' MAyFGYc1';
    rules += ' ZJ1';
    if (props.size === "L") rules += ' Lg1';
    else if (props.size === "S") rules += ' Le1';
    else rules += ' Lf1';
    rules += ' g21';
    rules += ' ob1';
    rules += ' nb1';
    rules += ' kb1';
    rules += ' jb1';
    rules += ' px1';
    rules += ' xd1';
    rules += ' _xa1';
    rules += ' xX0cczbc1';
    rules += ' _xX0cczba1';
    rules += ' T85xBjb1';
    rules += ' Q85xBjb1';
    rules += ' S85xBjb1';
    rules += ' R85xBjb1';
    rules += ' -M_-Mf1';
    return rules;
};
const $797cda10ca96fc86$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $faaBC$react.forwardRef)(function DropZone(props, ref) {
    let stringFormatter = (0, $faaBC$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($4526404114e78c80$exports))), '@react-spectrum/s2');
    [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $797cda10ca96fc86$export$14a72053295ff9a6);
    let { size: size = 'M' } = props;
    let domRef = (0, $faaBC$reactspectrumutils.useDOMRef)(ref);
    return /*#__PURE__*/ (0, $faaBC$reactjsxruntime.jsx)((0, $faaBC$reactariacomponents.DropZone), {
        ...props,
        ref: domRef,
        style: props.UNSAFE_style,
        className: (renderProps)=>(props.UNSAFE_className || '') + $797cda10ca96fc86$var$dropzone(renderProps, props.styles),
        children: (renderProps)=>/*#__PURE__*/ (0, $faaBC$reactjsxruntime.jsxs)((0, $faaBC$reactjsxruntime.Fragment), {
                children: [
                    /*#__PURE__*/ (0, $faaBC$reactjsxruntime.jsx)((0, $55f1b8940d3e02db$exports.IllustratedMessageContext).Provider, {
                        value: {
                            isInDropZone: true,
                            isDropTarget: renderProps.isDropTarget,
                            size: size
                        },
                        children: props.children
                    }),
                    renderProps.isDropTarget && props.isFilled && /*#__PURE__*/ (0, $faaBC$reactjsxruntime.jsx)("div", {
                        className: $797cda10ca96fc86$var$banner({
                            size: size
                        }),
                        children: /*#__PURE__*/ (0, $faaBC$reactjsxruntime.jsx)("span", {
                            children: props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')
                        })
                    })
                ]
            })
    });
});


//# sourceMappingURL=DropZone.cjs.map
