require("./Button.css");
var $e991cbcdf82ced71$exports = require("./CenterBaseline.cjs");
var $bde97c91243ed164$exports = require("../icons/Icon.cjs");
var $4526404114e78c80$exports = require("./intlStrings.cjs");
var $2061c83559b50a66$exports = require("./pressScale.cjs");
var $1c116ea4b0d2d023$exports = require("./ProgressCircle.cjs");
var $5eb75e0c130e0669$exports = require("../icons/Skeleton.cjs");
var $6367bc87eb7d24ad$exports = require("./Content.cjs");
var $bfa4962d90c8af48$exports = require("./Form.cjs");
var $ac757a4c2bd72aee$exports = require("../icons/useSpectrumContextProps.cjs");
var $8owBJ$reactjsxruntime = require("react/jsx-runtime");
var $8owBJ$reactariacomponents = require("react-aria-components");
var $8owBJ$react = require("react");
var $8owBJ$reactspectrumutils = require("@react-spectrum/utils");
var $8owBJ$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, "ButtonContext", () => $25d06cf8d4e72761$export$24d547caef80ccd1);
$parcel$export(module.exports, "LinkButtonContext", () => $25d06cf8d4e72761$export$1c1a176f3b9e48d3);
$parcel$export(module.exports, "usePendingState", () => $25d06cf8d4e72761$export$edc9ced5c3e5ff00);
$parcel$export(module.exports, "Button", () => $25d06cf8d4e72761$export$353f5b6fc5456de1);
$parcel$export(module.exports, "LinkButton", () => $25d06cf8d4e72761$export$29d11c0fe2fc51d8);
/*
 * 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 $25d06cf8d4e72761$export$24d547caef80ccd1 = /*#__PURE__*/ (0, $8owBJ$react.createContext)(null);
const $25d06cf8d4e72761$export$1c1a176f3b9e48d3 = /*#__PURE__*/ (0, $8owBJ$react.createContext)(null);
const $25d06cf8d4e72761$var$button = function anonymous(props, overrides) {
    let rules = " ";
    let minWidth = false;
    let position = false;
    let width = false;
    let matches = String(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] === "N") minWidth = true;
        if (p[1] === "_P") position = true;
        if (p[1] === "Z") width = true;
        rules += p[0];
    }
    if (props.isFocusVisible) rules += ' _Lf11';
    else rules += ' _Le11';
    if (props.isStaticColor) rules += ' Oe11';
    else rules += ' Oh11';
    rules += ' Olc11';
    rules += ' _Mc11';
    rules += ' _Kd11';
    if (props.staticColor === "white") rules += ' -Ovbhqd-gcwrnr11';
    else if (props.staticColor === "black") rules += ' -Ovbhqd-g4hn3s11';
    if (props.size === "XL") {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    } else if (props.size === "L") {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    } else if (props.size === "S") {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    } else if (props.size === "XS") {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    } else {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e11';
        rules += ' vx11';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d11';
        rules += ' vx11';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b11';
        rules += ' vx11';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a11';
        rules += ' vx11';
    } else {
        rules += ' -_6BNtrc-c11';
        rules += ' vx11';
    }
    rules += ' xd11';
    rules += ' _xa11';
    rules += ' xX0cczbc11';
    rules += ' _xX0cczba11';
    if (props.size === "XL") {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    } else if (props.size === "L") {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    } else if (props.size === "S") {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    } else if (props.size === "XS") {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    } else {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    }
    if (props.isStaticColor) {
        if (props.isDisabled) rules += ' pi11';
        else if (props.fillStyle === "outline") {
            if (props.variant === "genai") rules += ' px11';
            else if (props.variant === "premium") rules += ' px11';
            else {
                if (props.isPressed) rules += ' pk11';
                else if (props.isFocusVisible) rules += ' pk11';
                else if (props.isHovered) rules += ' pk11';
                else rules += ' pj11';
            }
        } else if (props.fillStyle === "fill") {
            if (props.variant === "genai") rules += ' px11';
            else if (props.variant === "premium") rules += ' px11';
            else if (props.variant === "secondary") {
                if (props.isPressed) rules += ' pk11';
                else if (props.isFocusVisible) rules += ' pk11';
                else if (props.isHovered) rules += ' pk11';
                else rules += ' pj11';
            } else if (props.variant === "primary") rules += ' ph11';
        }
    } else if (props.fillStyle === "outline") {
        if (props.isDisabled) rules += ' pp11';
        else if (props.variant === "genai") rules += ' px11';
        else if (props.variant === "premium") rules += ' px11';
        else {
            if (props.isPressed) rules += ' po11';
            else if (props.isFocusVisible) rules += ' po11';
            else if (props.isHovered) rules += ' po11';
            else rules += ' pt11';
        }
    } else if (props.fillStyle === "fill") {
        if (props.isDisabled) rules += ' pp11';
        else if (props.variant === "genai") rules += ' px11';
        else if (props.variant === "premium") rules += ' px11';
        else if (props.variant === "negative") rules += ' px11';
        else if (props.variant === "accent") rules += ' px11';
        else if (props.variant === "secondary") {
            if (props.isPressed) rules += ' po11';
            else if (props.isFocusVisible) rules += ' po11';
            else if (props.isHovered) rules += ' po11';
            else rules += ' pt11';
        } else if (props.variant === "primary") rules += ' pr11';
    }
    if (props.fillStyle === "outline") {
        if (props.isDisabled) rules += ' plc11';
        else rules += ' plb11';
    } else if (props.fillStyle === "fill") {
        if (props.isDisabled) rules += ' ple11';
        else rules += ' pla11';
    }
    rules += ' sd11';
    rules += ' ea11';
    rules += ' egLWx3bb11';
    rules += ' _oa11';
    rules += ' Sw11';
    rules += ' SgLWx3bd11';
    rules += ' Rw11';
    rules += ' RgLWx3bd11';
    if (props.size === "XL") {
        if (!minWidth) rules += ' Nl11';
    } else if (props.size === "L") {
        if (!minWidth) rules += ' Nj11';
    } else if (props.size === "S") {
        if (!minWidth) rules += ' Nf11';
    } else if (props.size === "XS") {
        if (!minWidth) rules += ' Ne11';
    } else if (!minWidth) rules += ' Nk11';
    rules += ' oh11';
    rules += ' nh11';
    rules += ' kh11';
    rules += ' jh11';
    rules += ' qc11';
    rules += ' qsd11';
    rules += ' -Qg41Lb-IAxCW0c11';
    rules += ' -Qg41Lb-gLWx3bIy11';
    rules += ' MAyFGYc11';
    rules += ' Td11';
    rules += ' Qd11';
    rules += ' -aRvJDd-Tu7Fubd11';
    if (!position) rules += ' _Pc11';
    rules += ' _Ca11';
    rules += ' _Wd11';
    rules += ' _4c11';
    if (!width) rules += ' ZJ11';
    rules += ' _Xa11';
    rules += ' Yd11';
    rules += ' Xb11';
    rules += ' _2b11';
    rules += ' _jf11';
    rules += ' _kJ8iPYd11';
    rules += ' hXMFGYc11';
    if (props.variant === "genai") rules += ' ma11';
    else if (props.variant === "premium") rules += ' ma11';
    else if (props.fillStyle === "outline") rules += ' mc11';
    else if (props.fillStyle === "fill") rules += ' ma11';
    if (props.variant === "genai") rules += ' la11';
    else if (props.variant === "premium") rules += ' la11';
    else if (props.fillStyle === "outline") rules += ' lc11';
    else if (props.fillStyle === "fill") rules += ' la11';
    if (props.isStaticColor) {
        if (props.isDisabled) rules += ' ig11';
        else if (props.variant === "secondary") {
            if (props.isPressed) rules += ' ih11';
            else if (props.isFocusVisible) rules += ' ih11';
            else if (props.isHovered) rules += ' ih11';
            else rules += ' ig11';
        } else if (props.variant === "primary") {
            if (props.isPressed) rules += ' ij11';
            else if (props.isFocusVisible) rules += ' ij11';
            else if (props.isHovered) rules += ' ij11';
            else rules += ' ii11';
        }
    } else if (props.isDisabled) rules += ' iq11';
    else if (props.variant === "secondary") {
        if (props.isPressed) rules += ' io11';
        else if (props.isFocusVisible) rules += ' io11';
        else if (props.isHovered) rules += ' io11';
        else rules += ' iq11';
    } else if (props.variant === "primary") {
        if (props.isPressed) rules += ' in11';
        else if (props.isFocusVisible) rules += ' in11';
        else if (props.isHovered) rules += ' in11';
        else rules += ' iv11';
    }
    if (props.isDisabled) rules += ' ilc11';
    else if (props.isHovered) rules += ' ild11';
    else rules += ' ila11';
    rules += ' gqMFGYc11';
    rules += ' -_8sjo0b-t5ZbAob11';
    rules += ' _yb11';
    rules += ' __ca11';
    if (props.size === "XL") rules += ' -M_-Mk11';
    else if (props.size === "L") rules += ' -M_-Mh11';
    else if (props.size === "S") rules += ' -M_-Mg11';
    else if (props.size === "XS") rules += ' -M_-Mf11';
    else rules += ' -M_-Mi11';
    if (props.variant === "genai") rules += ' -_k_-_ka11';
    else if (props.variant === "premium") rules += ' -_k_-_ka11';
    else if (props.fillStyle === "outline") rules += ' -_k_-_kc11';
    else if (props.fillStyle === "fill") rules += ' -_k_-_ka11';
    if (props.variant === "genai") rules += ' -h_-ha11';
    else if (props.variant === "premium") rules += ' -h_-ha11';
    else if (props.fillStyle === "outline") rules += ' -h_-hc11';
    else if (props.fillStyle === "fill") rules += ' -h_-ha11';
    if (props.isStaticColor) {
        if (props.fillStyle === "outline") {
            if (props.isDisabled) {
                if (props.variant === "genai") rules += ' -g_-gf11';
                else if (props.variant === "premium") rules += ' -g_-gf11';
                else rules += ' -g_-g911';
            } else if (props.isFocusVisible) rules += ' -g_-gf11';
            else if (props.isPressed) rules += ' -g_-gf11';
            else if (props.isHovered) rules += ' -g_-gf11';
            else if (props.variant === "genai") rules += ' -g_-gf11';
            else if (props.variant === "premium") rules += ' -g_-gf11';
            else rules += ' -g_-g911';
        } else if (props.fillStyle === "fill") {
            if (props.isDisabled) rules += ' -g_-gf11';
            else if (props.variant === "genai") rules += ' -g_-gf11';
            else if (props.variant === "premium") rules += ' -g_-gf11';
            else if (props.variant === "secondary") {
                if (props.isPressed) rules += ' -g_-gg11';
                else if (props.isFocusVisible) rules += ' -g_-gg11';
                else if (props.isHovered) rules += ' -g_-gg11';
                else rules += ' -g_-gf11';
            } else if (props.variant === "primary") {
                if (props.isPressed) rules += ' -g_-gj11';
                else if (props.isFocusVisible) rules += ' -g_-gj11';
                else if (props.isHovered) rules += ' -g_-gj11';
                else rules += ' -g_-gi11';
            }
        }
    } else if (props.fillStyle === "outline") {
        if (props.isDisabled) {
            if (props.variant === "genai") rules += ' -g_-gH11';
            else if (props.variant === "premium") rules += ' -g_-gH11';
            else rules += ' -g_-g911';
        } else if (props.isFocusVisible) rules += ' -g_-gH11';
        else if (props.isPressed) rules += ' -g_-gH11';
        else if (props.isHovered) rules += ' -g_-gH11';
        else if (props.variant === "genai") rules += ' -g_-gH11';
        else if (props.variant === "premium") rules += ' -g_-gH11';
        else rules += ' -g_-g911';
    } else if (props.fillStyle === "fill") {
        if (props.isDisabled) rules += ' -g_-gH11';
        else if (props.variant === "genai") rules += ' -g_-gH11';
        else if (props.variant === "premium") rules += ' -g_-gH11';
        else if (props.variant === "negative") {
            if (props.isFocusVisible) rules += ' -g_-gYvV9s11';
            else if (props.isPressed) rules += ' -g_-gYvV9s11';
            else if (props.isHovered) rules += ' -g_-gYvV9s11';
            else rules += ' -g_-g7aei811';
        } else if (props.variant === "accent") {
            if (props.isFocusVisible) rules += ' -g_-gUgARdd11';
            else if (props.isPressed) rules += ' -g_-gUgARdd11';
            else if (props.isHovered) rules += ' -g_-gUgARdd11';
            else rules += ' -g_-g5qAiPc11';
        } else if (props.variant === "secondary") {
            if (props.isPressed) rules += ' -g_-gF11';
            else if (props.isFocusVisible) rules += ' -g_-gF11';
            else if (props.isHovered) rules += ' -g_-gF11';
            else rules += ' -g_-gH11';
        } else if (props.variant === "primary") {
            if (props.isPressed) rules += ' -g_-gu11';
            else if (props.isFocusVisible) rules += ' -g_-gu11';
            else if (props.isHovered) rules += ' -g_-gu11';
            else rules += ' -g_-g011';
        }
    }
    if (props.fillStyle === "outline") rules += ' -g_-lgb11';
    else if (props.fillStyle === "fill") {
        if (props.isDisabled) rules += ' -g_-lgd11';
        else if (props.isHovered) rules += ' -g_-lge11';
        else rules += ' -g_-lgc11';
    }
    return rules;
};
// Put the gradient background on a separate element from the button to work around a Safari
// bug where transitions of custom properties cause layout flickering if any properties use rems. 🤣
// https://bugs.webkit.org/show_bug.cgi?id=285622
const $25d06cf8d4e72761$var$gradient = function anonymous(props) {
    let rules = " ";
    rules += ' _Pa11';
    rules += ' Wr11';
    rules += ' _lr11';
    rules += ' _Ar11';
    rules += ' _zr11';
    rules += ' _9a11';
    rules += ' Yd11';
    rules += ' Xb11';
    rules += ' _2b11';
    rules += ' oi11';
    rules += ' ni11';
    rules += ' ki11';
    rules += ' ji11';
    if (props.isDisabled) rules += ' _ic11';
    else if (props.variant === "genai") {
        if (props.isFocusVisible) {
            rules += ' _ia11';
            rules += ' -yBNtrc-37ZLpd11';
            rules += ' -zBNtrc-plLfSc11';
            rules += ' -ABNtrc-z2bZib11';
            rules += ' -ACNtrc-tQ56Od11';
        } else if (props.isPressed) {
            rules += ' _ia11';
            rules += ' -yBNtrc-37ZLpd11';
            rules += ' -zBNtrc-plLfSc11';
            rules += ' -ABNtrc-z2bZib11';
            rules += ' -ACNtrc-tQ56Od11';
        } else if (props.isHovered) {
            rules += ' _ia11';
            rules += ' -yBNtrc-37ZLpd11';
            rules += ' -zBNtrc-plLfSc11';
            rules += ' -ABNtrc-z2bZib11';
            rules += ' -ACNtrc-tQ56Od11';
        } else {
            rules += ' _ia11';
            rules += ' -yBNtrc-Nitqwc11';
            rules += ' -zBNtrc-ugAmz11';
            rules += ' -ABNtrc-j7ulPc11';
            rules += ' -ACNtrc-tQ56Od11';
        }
    } else if (props.variant === "premium") {
        if (props.isFocusVisible) {
            rules += ' _ib11';
            rules += ' -yBNtrc-1gYRFc11';
            rules += ' -zBNtrc-z2bZib11';
            rules += ' -ABNtrc-BorWLb11';
            rules += ' -ACNtrc-tQ56Od11';
        } else if (props.isPressed) {
            rules += ' _ib11';
            rules += ' -yBNtrc-1gYRFc11';
            rules += ' -zBNtrc-z2bZib11';
            rules += ' -ABNtrc-BorWLb11';
            rules += ' -ACNtrc-tQ56Od11';
        } else if (props.isHovered) {
            rules += ' _ib11';
            rules += ' -yBNtrc-1gYRFc11';
            rules += ' -zBNtrc-z2bZib11';
            rules += ' -ABNtrc-BorWLb11';
            rules += ' -ACNtrc-tQ56Od11';
        } else {
            rules += ' _ib11';
            rules += ' -yBNtrc-X7W3Sb11';
            rules += ' -zBNtrc-j7ulPc11';
            rules += ' -ABNtrc-fHZGqb11';
            rules += ' -ACNtrc-tQ56Od11';
        }
    }
    rules += ' _ilc11';
    if (props.variant === "genai") rules += ' _pb11';
    else if (props.variant === "premium") rules += ' _pb11';
    return rules;
};
function $25d06cf8d4e72761$export$edc9ced5c3e5ff00(isPending) {
    let [isProgressVisible, setIsProgressVisible] = (0, $8owBJ$react.useState)(false);
    (0, $8owBJ$react.useEffect)(()=>{
        let timeout;
        if (isPending) timeout = setTimeout(()=>{
            setIsProgressVisible(true);
        }, 1000);
        else setIsProgressVisible(false);
        return ()=>{
            clearTimeout(timeout);
        };
    }, [
        isPending
    ]);
    return {
        isProgressVisible: isProgressVisible
    };
}
const $25d06cf8d4e72761$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $8owBJ$react.forwardRef)(function Button(props1, ref) {
    [props1, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props1, ref, $25d06cf8d4e72761$export$24d547caef80ccd1);
    props1 = (0, $bfa4962d90c8af48$exports.useFormProps)(props1);
    let stringFormatter = (0, $8owBJ$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($4526404114e78c80$exports))), '@react-spectrum/s2');
    let { isPending: isPending = false, variant: variant = 'primary', fillStyle: fillStyle = 'fill', size: size = 'M', staticColor: staticColor } = props1;
    let domRef = (0, $8owBJ$reactspectrumutils.useFocusableRef)(ref);
    let overlayTriggerState = (0, $8owBJ$react.useContext)((0, $8owBJ$reactariacomponents.OverlayTriggerStateContext));
    let { isProgressVisible: isProgressVisible } = $25d06cf8d4e72761$export$edc9ced5c3e5ff00(isPending);
    return /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)((0, $8owBJ$reactariacomponents.Button), {
        ...props1,
        ref: domRef,
        style: (0, $2061c83559b50a66$exports.pressScale)(domRef, props1.UNSAFE_style),
        className: (renderProps)=>(props1.UNSAFE_className || '') + $25d06cf8d4e72761$var$button({
                ...renderProps,
                // Retain hover styles when an overlay is open.
                isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,
                isDisabled: renderProps.isDisabled || isProgressVisible,
                variant: variant,
                fillStyle: fillStyle,
                size: size,
                staticColor: staticColor,
                isStaticColor: !!staticColor
            }, props1.styles),
        children: (renderProps)=>/*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsxs)((0, $8owBJ$reactjsxruntime.Fragment), {
                children: [
                    variant === 'genai' || variant === 'premium' ? /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)("span", {
                        className: $25d06cf8d4e72761$var$gradient({
                            ...renderProps,
                            // Retain hover styles when an overlay is open.
                            isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,
                            isDisabled: renderProps.isDisabled || isProgressVisible,
                            variant: variant
                        })
                    }) : null,
                    /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsxs)((0, $8owBJ$reactariacomponents.Provider), {
                        values: [
                            [
                                (0, $5eb75e0c130e0669$exports.SkeletonContext),
                                null
                            ],
                            [
                                (0, $6367bc87eb7d24ad$exports.TextContext),
                                {
                                    styles: function anonymous(props) {
                                        let rules = " ";
                                        rules += ' TAzEcG11';
                                        rules += ' QAzEcG11';
                                        rules += ' _Jb11';
                                        if (props.isProgressVisible) rules += ' _6b11';
                                        return rules;
                                    }({
                                        isProgressVisible: isProgressVisible
                                    }),
                                    // @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past
                                    'data-rsp-slot': 'text'
                                }
                            ],
                            [
                                (0, $bde97c91243ed164$exports.IconContext),
                                {
                                    render: (0, $e991cbcdf82ced71$exports.centerBaseline)({
                                        slot: 'icon',
                                        styles: " _Ja11"
                                    }),
                                    styles: function anonymous(props) {
                                        let rules = " ";
                                        rules += ' ZuUmpre11';
                                        rules += ' FuUmpre11';
                                        rules += ' I67logd11';
                                        rules += ' _va11';
                                        if (props.isProgressVisible) rules += ' _6b11';
                                        return rules;
                                    }({
                                        isProgressVisible: isProgressVisible
                                    })
                                }
                            ]
                        ],
                        children: [
                            typeof props1.children === 'string' ? /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)((0, $6367bc87eb7d24ad$exports.Text), {
                                children: props1.children
                            }) : props1.children,
                            isPending && /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)("div", {
                                className: function anonymous(props) {
                                    let rules = " ";
                                    rules += ' _Pa11';
                                    rules += ' WF11';
                                    rules += ' _EF11';
                                    rules += ' _Zc11';
                                    if (props.isProgressVisible) rules += ' _6c11';
                                    else rules += ' _6b11';
                                    return rules;
                                }({
                                    isProgressVisible: isProgressVisible,
                                    isPending: isPending
                                }),
                                children: /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)((0, $1c116ea4b0d2d023$exports.ProgressCircle), {
                                    isIndeterminate: true,
                                    "aria-label": stringFormatter.format('button.pending'),
                                    size: "S",
                                    staticColor: staticColor,
                                    styles: function anonymous(props) {
                                        let rules = " ";
                                        if (props.size === "XL") rules += ' Zo11';
                                        else if (props.size === "L") rules += ' Zm11';
                                        else if (props.size === "M") rules += ' Zl11';
                                        else if (props.size === "S") rules += ' Zk11';
                                        if (props.size === "XL") rules += ' Fp11';
                                        else if (props.size === "L") rules += ' Fn11';
                                        else if (props.size === "M") rules += ' Fm11';
                                        else if (props.size === "S") rules += ' Fl11';
                                        return rules;
                                    }({
                                        size: size
                                    })
                                })
                            })
                        ]
                    })
                ]
            })
    });
});
const $25d06cf8d4e72761$export$29d11c0fe2fc51d8 = /*#__PURE__*/ (0, $8owBJ$react.forwardRef)(function LinkButton(props, ref) {
    [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $25d06cf8d4e72761$export$1c1a176f3b9e48d3);
    props = (0, $bfa4962d90c8af48$exports.useFormProps)(props);
    let domRef = (0, $8owBJ$reactspectrumutils.useFocusableRef)(ref);
    let overlayTriggerState = (0, $8owBJ$react.useContext)((0, $8owBJ$reactariacomponents.OverlayTriggerStateContext));
    let { fillStyle: fillStyle = 'fill', size: size = 'M', variant: variant = 'primary', staticColor: staticColor, styles: styles, children: children } = props;
    return /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)((0, $8owBJ$reactariacomponents.Link), {
        ...props,
        ref: domRef,
        style: (0, $2061c83559b50a66$exports.pressScale)(domRef, props.UNSAFE_style),
        className: (renderProps)=>(props.UNSAFE_className || '') + $25d06cf8d4e72761$var$button({
                ...renderProps,
                // Retain hover styles when an overlay is open.
                isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,
                variant: variant,
                fillStyle: fillStyle,
                size: size,
                staticColor: staticColor,
                isStaticColor: !!staticColor,
                isPending: false
            }, styles),
        children: (renderProps)=>/*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsxs)((0, $8owBJ$reactjsxruntime.Fragment), {
                children: [
                    variant === 'genai' || variant === 'premium' ? /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)("span", {
                        className: $25d06cf8d4e72761$var$gradient({
                            ...renderProps,
                            // Retain hover styles when an overlay is open.
                            isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,
                            variant: variant
                        })
                    }) : null,
                    /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)((0, $8owBJ$reactariacomponents.Provider), {
                        values: [
                            [
                                (0, $5eb75e0c130e0669$exports.SkeletonContext),
                                null
                            ],
                            [
                                (0, $6367bc87eb7d24ad$exports.TextContext),
                                {
                                    styles: " TAzEcG11 QAzEcG11 _Jb11",
                                    // @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past
                                    'data-rsp-slot': 'text'
                                }
                            ],
                            [
                                (0, $bde97c91243ed164$exports.IconContext),
                                {
                                    render: (0, $e991cbcdf82ced71$exports.centerBaseline)({
                                        slot: 'icon',
                                        styles: " _Ja11"
                                    }),
                                    styles: " ZuUmpre11 FuUmpre11 I67logd11 _va11"
                                }
                            ]
                        ],
                        children: typeof children === 'string' ? /*#__PURE__*/ (0, $8owBJ$reactjsxruntime.jsx)((0, $6367bc87eb7d24ad$exports.Text), {
                            children: children
                        }) : children
                    })
                ]
            })
    });
});


//# sourceMappingURL=Button.cjs.map
