import "./Divider.css";
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
import {jsx as $5nGzy$jsx} from "react/jsx-runtime";
import {Separator as $5nGzy$Separator} from "react-aria-components";
import {createContext as $5nGzy$createContext, forwardRef as $5nGzy$forwardRef} from "react";
import {useDOMRef as $5nGzy$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 $bdf52657dac0f070$export$30fbfd376abdf190 = /*#__PURE__*/ (0, $5nGzy$createContext)(null);
const $bdf52657dac0f070$export$e8c9778bf415dd08 = function anonymous(props, overrides) {
    let rules = " ";
    let alignSelf = false;
    let marginTop = false;
    let marginBottom = false;
    let marginInlineStart = false;
    let marginInlineEnd = false;
    let flexGrow = false;
    let flexShrink = false;
    let width = 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)[^\s]+/g);
    for (let p of matches){
        if (p[1] === "_d") alignSelf = true;
        if (p[1] === "J") marginTop = true;
        if (p[1] === "G") marginBottom = true;
        if (p[1] === "I") marginInlineStart = true;
        if (p[1] === "H") marginInlineEnd = true;
        if (p[1] === "_u") flexGrow = true;
        if (p[1] === "_v") flexShrink = true;
        if (p[1] === "Z") width = true;
        rules += p[0];
    }
    if (props.staticColor === "white") rules += ' -Ovbhqd-gcwrnr1';
    else if (props.staticColor === "black") rules += ' -Ovbhqd-g4hn3s1';
    if (!alignSelf) rules += ' _df1';
    if (props.isStaticColor) {
        if (props.size === "L") rules += ' gi1';
        else rules += ' gg1';
    } else if (props.size === "L") rules += ' g01';
    else rules += ' gF1';
    rules += ' gl_a1';
    rules += ' _je1';
    rules += ' og1';
    rules += ' ng1';
    rules += ' kg1';
    rules += ' jg1';
    if (!marginTop) rules += ' Jy1';
    if (!marginBottom) rules += ' Gy1';
    if (!marginInlineStart) rules += ' Iy1';
    if (!marginInlineEnd) rules += ' Hy1';
    if (!flexGrow) rules += ' _ua1';
    if (!flexShrink) rules += ' _va1';
    if (props.orientation === "horizontal") {
        if (props.size === "L") rules += ' FT4Nfn1';
        else if (props.size === "S") rules += ' FceNfn1';
        else rules += ' FLvNfn1';
    }
    if (props.orientation === "vertical") {
        if (props.size === "L") {
            if (!width) rules += ' ZT4Nfn1';
        } else if (props.size === "S") {
            if (!width) rules += ' ZceNfn1';
        } else if (!width) rules += ' ZLvNfn1';
    }
    return rules;
};
const $bdf52657dac0f070$export$2e0a83ec2e27ecbb = /*#__PURE__*/ (0, $5nGzy$forwardRef)(function Divider(props, ref) {
    [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $bdf52657dac0f070$export$30fbfd376abdf190);
    let domRef = (0, $5nGzy$useDOMRef)(ref);
    return /*#__PURE__*/ (0, $5nGzy$jsx)((0, $5nGzy$Separator), {
        ...props,
        ref: domRef,
        style: props.UNSAFE_style,
        className: (props.UNSAFE_className || '') + $bdf52657dac0f070$export$e8c9778bf415dd08({
            size: props.size || 'M',
            orientation: props.orientation || 'horizontal',
            staticColor: props.staticColor,
            isStaticColor: !!props.staticColor
        }, props.styles)
    });
});


export {$bdf52657dac0f070$export$30fbfd376abdf190 as DividerContext, $bdf52657dac0f070$export$e8c9778bf415dd08 as divider, $bdf52657dac0f070$export$2e0a83ec2e27ecbb as Divider};
//# sourceMappingURL=Divider.mjs.map
