import "./IllustratedMessage.css";
import {ButtonGroupContext as $472eaa9a9b344b9a$export$4c574c91bb0be0e2} from "./ButtonGroup.mjs";
import {ContentContext as $8e847109a6ab556d$export$1cbdd774077931b4, HeadingContext as $8e847109a6ab556d$export$d688439359537581} from "./Content.mjs";
import {IllustrationContext as $ac8c32e6775ddd1f$export$207c7561471de4bd} from "../icons/Icon.mjs";
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
import {jsx as $3JmRZ$jsx} from "react/jsx-runtime";
import {Provider as $3JmRZ$Provider} from "react-aria-components";
import {createContext as $3JmRZ$createContext, forwardRef as $3JmRZ$forwardRef} from "react";
import {filterDOMProps as $3JmRZ$filterDOMProps} from "@react-aria/utils";
import {useDOMRef as $3JmRZ$useDOMRef} from "@react-spectrum/utils";

/*
 * 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 $4950413ac998f607$var$illustratedMessage = function anonymous(props, overrides) {
    let rules = " ";
    let maxWidth = 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] === "L") maxWidth = true;
        rules += p[0];
    }
    rules += ' se1';
    if (props.size === "XL") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "L") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "S") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "XS") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e1';
        rules += ' vx1';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d1';
        rules += ' vx1';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b1';
        rules += ' vx1';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a1';
        rules += ' vx1';
    } else {
        rules += ' -_6BNtrc-c1';
        rules += ' vx1';
    }
    if (props.size === "XL") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "L") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "S") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "XS") {
        rules += ' xb1';
        rules += ' _xa1';
    } else {
        rules += ' xb1';
        rules += ' _xa1';
    }
    if (props.size === "XL") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "L") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "S") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "XS") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    }
    if (props.size === "XL") rules += ' pt1';
    else if (props.size === "L") rules += ' pt1';
    else if (props.size === "S") rules += ' pt1';
    else if (props.size === "XS") rules += ' pt1';
    else rules += ' pt1';
    if (props.orientation === "horizontal") {
        if (!maxWidth) rules += ' Lj1';
    } else if (props.orientation === "vertical") {
        if (!maxWidth) rules += ' Li1';
    }
    if (props.orientation === "horizontal") rules += ' CLJajOe1';
    else if (props.orientation === "vertical") rules += ' CPmblS1';
    if (props.orientation === "horizontal") rules += ' E6zxP8c1';
    else if (props.orientation === "vertical") {
        if (props.size === "L") rules += ' EdL7991';
        else rules += ' E02fTrb1';
    }
    if (props.orientation === "horizontal") rules += ' DrSmbR1';
    if (props.orientation === "horizontal") rules += ' _Dc1';
    else if (props.orientation === "vertical") rules += ' _Da1';
    if (props.orientation === "vertical") rules += ' _Wa1';
    return rules;
};
const $4950413ac998f607$var$illustration = function anonymous(props) {
    let rules = " ";
    rules += ' zTZ8xtd1';
    rules += ' yTZ8xtd1';
    rules += ' BTZ8xtd1';
    rules += ' ATZ8xtd1';
    rules += ' _dc1';
    if (props.isDropTarget) rules += ' -_8sjo0b-pu1';
    else rules += ' -_8sjo0b-pt1';
    return rules;
};
const $4950413ac998f607$var$heading = function anonymous(props) {
    let rules = " ";
    rules += ' zPCJngb1';
    rules += ' yPCJngb1';
    rules += ' BPCJngb1';
    rules += ' APCJngb1';
    if (props.size === "L") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "M") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "S") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    }
    if (props.size === "L") {
        rules += ' -_6BNtrc-g1';
        rules += ' vx1';
    } else if (props.size === "M") {
        rules += ' -_6BNtrc-f1';
        rules += ' vx1';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-d1';
        rules += ' vx1';
    }
    if (props.size === "L") {
        rules += ' xd1';
        rules += ' _xa1';
        rules += ' xX0cczbc1';
        rules += ' _xX0cczba1';
        rules += ' xfd1';
        rules += ' _xfa1';
        rules += ' xfX0cczbc1';
        rules += ' _xfX0cczba1';
    } else if (props.size === "M") {
        rules += ' xd1';
        rules += ' _xa1';
        rules += ' xX0cczbc1';
        rules += ' _xX0cczba1';
        rules += ' xfd1';
        rules += ' _xfa1';
        rules += ' xfX0cczbc1';
        rules += ' _xfX0cczba1';
    } else if (props.size === "S") {
        rules += ' xd1';
        rules += ' _xa1';
        rules += ' xX0cczbc1';
        rules += ' _xX0cczba1';
        rules += ' xfd1';
        rules += ' _xfa1';
        rules += ' xfX0cczbc1';
        rules += ' _xfX0cczba1';
    }
    if (props.size === "L") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "M") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "S") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    }
    if (props.size === "L") rules += ' po1';
    else if (props.size === "M") rules += ' po1';
    else if (props.size === "S") rules += ' po1';
    rules += ' _dd1';
    rules += ' Jy1';
    rules += ' Gy1';
    rules += ' Iy1';
    rules += ' Hy1';
    return rules;
};
const $4950413ac998f607$var$content = function anonymous(props) {
    let rules = " ";
    if (props.size === "L") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "M") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "S") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    }
    if (props.size === "L") {
        rules += ' -_6BNtrc-c1';
        rules += ' vx1';
    } else if (props.size === "M") {
        rules += ' -_6BNtrc-c1';
        rules += ' vx1';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b1';
        rules += ' vx1';
    }
    if (props.size === "L") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "M") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "S") {
        rules += ' xb1';
        rules += ' _xa1';
    }
    if (props.size === "L") {
        rules += ' _Fb1';
        rules += ' _FnuYUwec1';
    } else if (props.size === "M") {
        rules += ' _Fb1';
        rules += ' _FnuYUwec1';
    } else if (props.size === "S") {
        rules += ' _Fb1';
        rules += ' _FnuYUwec1';
    }
    if (props.size === "L") rules += ' pt1';
    else if (props.size === "M") rules += ' pt1';
    else if (props.size === "S") rules += ' pt1';
    rules += ' zk52g2d1';
    rules += ' yk52g2d1';
    rules += ' Bk52g2d1';
    rules += ' Ak52g2d1';
    rules += ' _de1';
    return rules;
};
const $4950413ac998f607$var$buttonGroup = " zmlKpq1 ymlKpq1 BmlKpq1 AmlKpq1 JC1";
const $4950413ac998f607$export$d661ef89ad42d682 = /*#__PURE__*/ (0, $3JmRZ$createContext)(null);
const $4950413ac998f607$export$406dbc84c317ece0 = /*#__PURE__*/ (0, $3JmRZ$forwardRef)(function IllustratedMessage(props, ref) {
    [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $4950413ac998f607$export$d661ef89ad42d682);
    let domRef = (0, $3JmRZ$useDOMRef)(ref);
    let { children: children, orientation: orientation = 'horizontal', size: size = 'M', UNSAFE_className: UNSAFE_className = '', UNSAFE_style: UNSAFE_style, isInDropZone: isInDropZone = false, isDropTarget: isDropTarget = false, ...otherProps } = props;
    return /*#__PURE__*/ (0, $3JmRZ$jsx)("div", {
        ...(0, $3JmRZ$filterDOMProps)(otherProps),
        style: UNSAFE_style,
        className: UNSAFE_className + $4950413ac998f607$var$illustratedMessage({
            size: props.size || 'M',
            orientation: props.orientation || 'vertical'
        }, props.styles),
        ref: domRef,
        children: /*#__PURE__*/ (0, $3JmRZ$jsx)((0, $3JmRZ$Provider), {
            values: [
                [
                    (0, $8e847109a6ab556d$export$d688439359537581),
                    {
                        styles: $4950413ac998f607$var$heading({
                            orientation: orientation,
                            size: size
                        })
                    }
                ],
                [
                    (0, $8e847109a6ab556d$export$1cbdd774077931b4),
                    {
                        styles: $4950413ac998f607$var$content({
                            size: size
                        })
                    }
                ],
                [
                    (0, $ac8c32e6775ddd1f$export$207c7561471de4bd),
                    {
                        size: size === 'L' ? 'L' : 'M',
                        styles: $4950413ac998f607$var$illustration({
                            orientation: orientation,
                            size: size,
                            isInDropZone: isInDropZone,
                            isDropTarget: isDropTarget
                        })
                    }
                ],
                [
                    (0, $472eaa9a9b344b9a$export$4c574c91bb0be0e2),
                    {
                        styles: $4950413ac998f607$var$buttonGroup
                    }
                ]
            ],
            children: children
        })
    });
});


export {$4950413ac998f607$export$d661ef89ad42d682 as IllustratedMessageContext, $4950413ac998f607$export$406dbc84c317ece0 as IllustratedMessage};
//# sourceMappingURL=IllustratedMessage.mjs.map
