import "./StatusLight.css";
import {CenterBaseline as $1f4b04be3f24aae3$export$768dac55bb57081d} from "./CenterBaseline.mjs";
import {Text as $8e847109a6ab556d$export$5f1af8db9871e1d6} from "./Content.mjs";
import {useIsSkeleton as $5ad421ec19460c48$export$4f8dc7555740235c} from "../icons/Skeleton.mjs";
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
import {jsxs as $2PVgW$jsxs, jsx as $2PVgW$jsx} from "react/jsx-runtime";
import {createContext as $2PVgW$createContext, forwardRef as $2PVgW$forwardRef} from "react";
import {filterDOMProps as $2PVgW$filterDOMProps} from "@react-aria/utils";
import {useDOMRef as $2PVgW$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 $cd71613dba8ee178$export$d8f8c0b091d8cb9b = /*#__PURE__*/ (0, $2PVgW$createContext)(null);
const $cd71613dba8ee178$var$wrapper = function anonymous(props, overrides) {
    let rules = " ";
    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] === "Z") width = true;
        rules += p[0];
    }
    rules += ' sd1';
    rules += ' Uc1';
    rules += ' Usd1';
    rules += ' qc1';
    rules += ' qsd1';
    rules += ' ea1';
    if (!width) rules += ' ZJ1';
    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.variant === "neutral") rules += ' pn1';
    else rules += ' pt1';
    rules += ' __ca1';
    return rules;
};
const $cd71613dba8ee178$var$light = function anonymous(props) {
    let rules = " ";
    if (props.size === "XL") rules += ' Zk1';
    else if (props.size === "L") rules += ' Zj1';
    else if (props.size === "M") rules += ' Zi1';
    else if (props.size === "S") rules += ' Zh1';
    if (props.size === "XL") rules += ' Fl1';
    else if (props.size === "L") rules += ' Fk1';
    else if (props.size === "M") rules += ' Fj1';
    else if (props.size === "S") rules += ' Fi1';
    if (props.isSkeleton) rules += ' tn1';
    else if (props.variant === "silver") rules += ' te1';
    else if (props.variant === "brown") rules += ' th1';
    else if (props.variant === "cinnamon") rules += ' tj1';
    else if (props.variant === "turquoise") rules += ' tb1';
    else if (props.variant === "pink") rules += ' to1';
    else if (props.variant === "yellow") rules += ' tl1';
    else if (props.variant === "seafoam") rules += ' tc1';
    else if (props.variant === "indigo") rules += ' td1';
    else if (props.variant === "magenta") rules += ' tp1';
    else if (props.variant === "purple") rules += ' ti1';
    else if (props.variant === "fuchsia") rules += ' tk1';
    else if (props.variant === "cyan") rules += ' ts1';
    else if (props.variant === "chartreuse") rules += ' tg1';
    else if (props.variant === "celery") rules += ' tv1';
    else if (props.variant === "negative") rules += ' tq1';
    else if (props.variant === "notice") rules += ' tm1';
    else if (props.variant === "positive") rules += ' tt1';
    else if (props.variant === "neutral") rules += ' tf1';
    else if (props.variant === "informative") rules += ' tu1';
    rules += ' _Ne1';
    rules += ' Pe1';
    return rules;
};
const $cd71613dba8ee178$export$5f84c37a31c6e41c = /*#__PURE__*/ (0, $2PVgW$forwardRef)(function StatusLight(props, ref) {
    [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $cd71613dba8ee178$export$d8f8c0b091d8cb9b);
    let { children: children, size: size = 'M', variant: variant = 'neutral', role: role, UNSAFE_className: UNSAFE_className = '', UNSAFE_style: UNSAFE_style, styles: styles } = props;
    let domRef = (0, $2PVgW$useDOMRef)(ref);
    let isSkeleton = (0, $5ad421ec19460c48$export$4f8dc7555740235c)();
    if (!children && !props['aria-label'] && process.env.NODE_ENV !== 'production') console.warn('If no children are provided, an aria-label must be specified');
    if (!role && (props['aria-label'] || props['aria-labelledby']) && process.env.NODE_ENV !== 'production') console.warn('A labelled StatusLight must have a role.');
    return /*#__PURE__*/ (0, $2PVgW$jsxs)("div", {
        ...(0, $2PVgW$filterDOMProps)(props, {
            labelable: !!role
        }),
        ref: domRef,
        role: role,
        style: UNSAFE_style,
        className: UNSAFE_className + $cd71613dba8ee178$var$wrapper({
            size: size,
            variant: variant
        }, styles),
        children: [
            /*#__PURE__*/ (0, $2PVgW$jsx)((0, $1f4b04be3f24aae3$export$768dac55bb57081d), {
                children: /*#__PURE__*/ (0, $2PVgW$jsx)("svg", {
                    className: $cd71613dba8ee178$var$light({
                        size: size,
                        variant: variant,
                        isSkeleton: isSkeleton
                    }),
                    "aria-hidden": "true",
                    children: /*#__PURE__*/ (0, $2PVgW$jsx)("circle", {
                        r: "50%",
                        cx: "50%",
                        cy: "50%"
                    })
                })
            }),
            /*#__PURE__*/ (0, $2PVgW$jsx)((0, $8e847109a6ab556d$export$5f1af8db9871e1d6), {
                children: children
            })
        ]
    });
});


export {$cd71613dba8ee178$export$d8f8c0b091d8cb9b as StatusLightContext, $cd71613dba8ee178$export$5f84c37a31c6e41c as StatusLight};
//# sourceMappingURL=StatusLight.mjs.map
