import "./Button.css";
import {centerBaseline as $1f4b04be3f24aae3$export$9d7e2342a7e53afa} from "./CenterBaseline.mjs";
import {IconContext as $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed} from "../icons/Icon.mjs";
import $7BBHC$intlStringsmjs from "./intlStrings.mjs";
import {pressScale as $10ea7662e51a285b$export$56e8cba416805d8d} from "./pressScale.mjs";
import {ProgressCircle as $41ddd91dbbf0c389$export$c79b9d6b4cc92af7} from "./ProgressCircle.mjs";
import {SkeletonContext as $5ad421ec19460c48$export$74e166679b1f49ee} from "../icons/Skeleton.mjs";
import {Text as $8e847109a6ab556d$export$5f1af8db9871e1d6, TextContext as $8e847109a6ab556d$export$9afb8bc826b033ea} from "./Content.mjs";
import {useFormProps as $9b916426527cebe7$export$a6b5be5c6b451665} from "./Form.mjs";
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
import {jsx as $7BBHC$jsx, jsxs as $7BBHC$jsxs, Fragment as $7BBHC$Fragment} from "react/jsx-runtime";
import {OverlayTriggerStateContext as $7BBHC$OverlayTriggerStateContext, Button as $7BBHC$Button, Provider as $7BBHC$Provider, Link as $7BBHC$Link} from "react-aria-components";
import {createContext as $7BBHC$createContext, useState as $7BBHC$useState, useEffect as $7BBHC$useEffect, forwardRef as $7BBHC$forwardRef, useContext as $7BBHC$useContext} from "react";
import {useFocusableRef as $7BBHC$useFocusableRef} from "@react-spectrum/utils";
import {useLocalizedStringFormatter as $7BBHC$useLocalizedStringFormatter} from "@react-aria/i18n";


function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
/*
 * 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 $067ea9f64ccd4e8e$export$24d547caef80ccd1 = /*#__PURE__*/ (0, $7BBHC$createContext)(null);
const $067ea9f64ccd4e8e$export$1c1a176f3b9e48d3 = /*#__PURE__*/ (0, $7BBHC$createContext)(null);
const $067ea9f64ccd4e8e$var$button = function anonymous(props, overrides) {
    let rules = " ";
    let minWidth = false;
    let position = 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] === "N") minWidth = true;
        if (p[1] === "_P") position = true;
        if (p[1] === "Z") width = true;
        rules += p[0];
    }
    if (props.isFocusVisible) rules += ' _Lf12';
    else rules += ' _Le12';
    if (props.isStaticColor) rules += ' Oe12';
    else rules += ' Oh12';
    rules += ' Olc12';
    rules += ' _Mc12';
    rules += ' _Kd12';
    if (props.staticColor === "white") rules += ' -Ovbhqd-gcwrnr12';
    else if (props.staticColor === "black") rules += ' -Ovbhqd-g4hn3s12';
    if (props.size === "XL") {
        rules += ' uk12';
        rules += ' uch12';
        rules += ' udi12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "L") {
        rules += ' uk12';
        rules += ' uch12';
        rules += ' udi12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "S") {
        rules += ' uk12';
        rules += ' uch12';
        rules += ' udi12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else if (props.size === "XS") {
        rules += ' uk12';
        rules += ' uch12';
        rules += ' udi12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    } else {
        rules += ' uk12';
        rules += ' uch12';
        rules += ' udi12';
        rules += ' uea12';
        rules += ' ugb12';
        rules += ' uhd12';
        rules += ' uje12';
        rules += ' u2NhKxcl12';
        rules += ' uic12';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e12';
        rules += ' vx12';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d12';
        rules += ' vx12';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b12';
        rules += ' vx12';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a12';
        rules += ' vx12';
    } else {
        rules += ' -_6BNtrc-c12';
        rules += ' vx12';
    }
    rules += ' xd12';
    rules += ' _xa12';
    rules += ' xX0cczbc12';
    rules += ' _xX0cczba12';
    if (props.size === "XL") {
        rules += ' _Fd12';
        rules += ' _FezxGHba12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "L") {
        rules += ' _Fd12';
        rules += ' _FezxGHba12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "S") {
        rules += ' _Fd12';
        rules += ' _FezxGHba12';
        rules += ' _FnuYUweb12';
    } else if (props.size === "XS") {
        rules += ' _Fd12';
        rules += ' _FezxGHba12';
        rules += ' _FnuYUweb12';
    } else {
        rules += ' _Fd12';
        rules += ' _FezxGHba12';
        rules += ' _FnuYUweb12';
    }
    if (props.isStaticColor) {
        if (props.isDisabled) rules += ' pi12';
        else if (props.fillStyle === "outline") {
            if (props.variant === "genai") rules += ' px12';
            else if (props.variant === "premium") rules += ' px12';
            else {
                if (props.isPressed) rules += ' pk12';
                else if (props.isFocusVisible) rules += ' pk12';
                else if (props.isHovered) rules += ' pk12';
                else rules += ' pj12';
            }
        } else if (props.fillStyle === "fill") {
            if (props.variant === "genai") rules += ' px12';
            else if (props.variant === "premium") rules += ' px12';
            else if (props.variant === "secondary") {
                if (props.isPressed) rules += ' pk12';
                else if (props.isFocusVisible) rules += ' pk12';
                else if (props.isHovered) rules += ' pk12';
                else rules += ' pj12';
            } else if (props.variant === "primary") rules += ' ph12';
        }
    } else if (props.fillStyle === "outline") {
        if (props.isDisabled) rules += ' pp12';
        else if (props.variant === "genai") rules += ' px12';
        else if (props.variant === "premium") rules += ' px12';
        else {
            if (props.isPressed) rules += ' po12';
            else if (props.isFocusVisible) rules += ' po12';
            else if (props.isHovered) rules += ' po12';
            else rules += ' pt12';
        }
    } else if (props.fillStyle === "fill") {
        if (props.isDisabled) rules += ' pp12';
        else if (props.variant === "genai") rules += ' px12';
        else if (props.variant === "premium") rules += ' px12';
        else if (props.variant === "negative") rules += ' px12';
        else if (props.variant === "accent") rules += ' px12';
        else if (props.variant === "secondary") {
            if (props.isPressed) rules += ' po12';
            else if (props.isFocusVisible) rules += ' po12';
            else if (props.isHovered) rules += ' po12';
            else rules += ' pt12';
        } else if (props.variant === "primary") rules += ' pr12';
    }
    if (props.fillStyle === "outline") {
        if (props.isDisabled) rules += ' plc12';
        else rules += ' plb12';
    } else if (props.fillStyle === "fill") {
        if (props.isDisabled) rules += ' ple12';
        else rules += ' pla12';
    }
    rules += ' sd12';
    rules += ' ea12';
    rules += ' egLWx3bb12';
    rules += ' _oa12';
    rules += ' Sw12';
    rules += ' SgLWx3bd12';
    rules += ' Rw12';
    rules += ' RgLWx3bd12';
    if (props.size === "XL") {
        if (!minWidth) rules += ' Nl12';
    } else if (props.size === "L") {
        if (!minWidth) rules += ' Nj12';
    } else if (props.size === "S") {
        if (!minWidth) rules += ' Nf12';
    } else if (props.size === "XS") {
        if (!minWidth) rules += ' Ne12';
    } else if (!minWidth) rules += ' Nk12';
    rules += ' oh12';
    rules += ' nh12';
    rules += ' kh12';
    rules += ' jh12';
    rules += ' qc12';
    rules += ' qsd12';
    rules += ' -Qg41Lb-IAxCW0c12';
    rules += ' -Qg41Lb-gLWx3bIy12';
    rules += ' MAyFGYc12';
    rules += ' Td12';
    rules += ' Qd12';
    rules += ' -aRvJDd-Tu7Fubd12';
    if (!position) rules += ' _Pc12';
    rules += ' _Ca12';
    rules += ' _Wd12';
    rules += ' _4c12';
    if (!width) rules += ' ZJ12';
    rules += ' _Xa12';
    rules += ' Yd12';
    rules += ' Xb12';
    rules += ' _2b12';
    rules += ' _jf12';
    rules += ' _kJ8iPYd12';
    rules += ' hXMFGYc12';
    if (props.variant === "genai") rules += ' ma12';
    else if (props.variant === "premium") rules += ' ma12';
    else if (props.fillStyle === "outline") rules += ' mc12';
    else if (props.fillStyle === "fill") rules += ' ma12';
    if (props.variant === "genai") rules += ' la12';
    else if (props.variant === "premium") rules += ' la12';
    else if (props.fillStyle === "outline") rules += ' lc12';
    else if (props.fillStyle === "fill") rules += ' la12';
    if (props.isStaticColor) {
        if (props.isDisabled) rules += ' ig12';
        else if (props.variant === "secondary") {
            if (props.isPressed) rules += ' ih12';
            else if (props.isFocusVisible) rules += ' ih12';
            else if (props.isHovered) rules += ' ih12';
            else rules += ' ig12';
        } else if (props.variant === "primary") {
            if (props.isPressed) rules += ' ij12';
            else if (props.isFocusVisible) rules += ' ij12';
            else if (props.isHovered) rules += ' ij12';
            else rules += ' ii12';
        }
    } else if (props.isDisabled) rules += ' iq12';
    else if (props.variant === "secondary") {
        if (props.isPressed) rules += ' io12';
        else if (props.isFocusVisible) rules += ' io12';
        else if (props.isHovered) rules += ' io12';
        else rules += ' iq12';
    } else if (props.variant === "primary") {
        if (props.isPressed) rules += ' in12';
        else if (props.isFocusVisible) rules += ' in12';
        else if (props.isHovered) rules += ' in12';
        else rules += ' iv12';
    }
    if (props.isDisabled) rules += ' ilc12';
    else if (props.isHovered) rules += ' ild12';
    else rules += ' ila12';
    rules += ' gqMFGYc12';
    rules += ' -_8sjo0b-t5ZbAob12';
    rules += ' _yb12';
    rules += ' __ca12';
    if (props.size === "XL") rules += ' -M_-Mk12';
    else if (props.size === "L") rules += ' -M_-Mh12';
    else if (props.size === "S") rules += ' -M_-Mg12';
    else if (props.size === "XS") rules += ' -M_-Mf12';
    else rules += ' -M_-Mi12';
    if (props.variant === "genai") rules += ' -_k_-_ka12';
    else if (props.variant === "premium") rules += ' -_k_-_ka12';
    else if (props.fillStyle === "outline") rules += ' -_k_-_kc12';
    else if (props.fillStyle === "fill") rules += ' -_k_-_ka12';
    if (props.variant === "genai") rules += ' -h_-ha12';
    else if (props.variant === "premium") rules += ' -h_-ha12';
    else if (props.fillStyle === "outline") rules += ' -h_-hc12';
    else if (props.fillStyle === "fill") rules += ' -h_-ha12';
    if (props.isStaticColor) {
        if (props.fillStyle === "outline") {
            if (props.isDisabled) {
                if (props.variant === "genai") rules += ' -g_-gf12';
                else if (props.variant === "premium") rules += ' -g_-gf12';
                else rules += ' -g_-g912';
            } else if (props.isFocusVisible) rules += ' -g_-gf12';
            else if (props.isPressed) rules += ' -g_-gf12';
            else if (props.isHovered) rules += ' -g_-gf12';
            else if (props.variant === "genai") rules += ' -g_-gf12';
            else if (props.variant === "premium") rules += ' -g_-gf12';
            else rules += ' -g_-g912';
        } else if (props.fillStyle === "fill") {
            if (props.isDisabled) rules += ' -g_-gf12';
            else if (props.variant === "genai") rules += ' -g_-gf12';
            else if (props.variant === "premium") rules += ' -g_-gf12';
            else if (props.variant === "secondary") {
                if (props.isPressed) rules += ' -g_-gg12';
                else if (props.isFocusVisible) rules += ' -g_-gg12';
                else if (props.isHovered) rules += ' -g_-gg12';
                else rules += ' -g_-gf12';
            } else if (props.variant === "primary") {
                if (props.isPressed) rules += ' -g_-gj12';
                else if (props.isFocusVisible) rules += ' -g_-gj12';
                else if (props.isHovered) rules += ' -g_-gj12';
                else rules += ' -g_-gi12';
            }
        }
    } else if (props.fillStyle === "outline") {
        if (props.isDisabled) {
            if (props.variant === "genai") rules += ' -g_-gH12';
            else if (props.variant === "premium") rules += ' -g_-gH12';
            else rules += ' -g_-g912';
        } else if (props.isFocusVisible) rules += ' -g_-gH12';
        else if (props.isPressed) rules += ' -g_-gH12';
        else if (props.isHovered) rules += ' -g_-gH12';
        else if (props.variant === "genai") rules += ' -g_-gH12';
        else if (props.variant === "premium") rules += ' -g_-gH12';
        else rules += ' -g_-g912';
    } else if (props.fillStyle === "fill") {
        if (props.isDisabled) rules += ' -g_-gH12';
        else if (props.variant === "genai") rules += ' -g_-gH12';
        else if (props.variant === "premium") rules += ' -g_-gH12';
        else if (props.variant === "negative") {
            if (props.isFocusVisible) rules += ' -g_-gYvV9s12';
            else if (props.isPressed) rules += ' -g_-gYvV9s12';
            else if (props.isHovered) rules += ' -g_-gYvV9s12';
            else rules += ' -g_-g7aei812';
        } else if (props.variant === "accent") {
            if (props.isFocusVisible) rules += ' -g_-gUgARdd12';
            else if (props.isPressed) rules += ' -g_-gUgARdd12';
            else if (props.isHovered) rules += ' -g_-gUgARdd12';
            else rules += ' -g_-g5qAiPc12';
        } else if (props.variant === "secondary") {
            if (props.isPressed) rules += ' -g_-gF12';
            else if (props.isFocusVisible) rules += ' -g_-gF12';
            else if (props.isHovered) rules += ' -g_-gF12';
            else rules += ' -g_-gH12';
        } else if (props.variant === "primary") {
            if (props.isPressed) rules += ' -g_-gu12';
            else if (props.isFocusVisible) rules += ' -g_-gu12';
            else if (props.isHovered) rules += ' -g_-gu12';
            else rules += ' -g_-g012';
        }
    }
    if (props.fillStyle === "outline") rules += ' -g_-lgb12';
    else if (props.fillStyle === "fill") {
        if (props.isDisabled) rules += ' -g_-lgd12';
        else if (props.isHovered) rules += ' -g_-lge12';
        else rules += ' -g_-lgc12';
    }
    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 $067ea9f64ccd4e8e$var$gradient = function anonymous(props) {
    let rules = " ";
    rules += ' _Pa12';
    rules += ' Wr12';
    rules += ' _lr12';
    rules += ' _Ar12';
    rules += ' _zr12';
    rules += ' _9a12';
    rules += ' Yd12';
    rules += ' Xb12';
    rules += ' _2b12';
    rules += ' oi12';
    rules += ' ni12';
    rules += ' ki12';
    rules += ' ji12';
    if (props.isDisabled) rules += ' _ic12';
    else if (props.variant === "genai") {
        if (props.isFocusVisible) {
            rules += ' _ia12';
            rules += ' -yBNtrc-37ZLpd12';
            rules += ' -zBNtrc-plLfSc12';
            rules += ' -ABNtrc-z2bZib12';
            rules += ' -ACNtrc-tQ56Od12';
        } else if (props.isPressed) {
            rules += ' _ia12';
            rules += ' -yBNtrc-37ZLpd12';
            rules += ' -zBNtrc-plLfSc12';
            rules += ' -ABNtrc-z2bZib12';
            rules += ' -ACNtrc-tQ56Od12';
        } else if (props.isHovered) {
            rules += ' _ia12';
            rules += ' -yBNtrc-37ZLpd12';
            rules += ' -zBNtrc-plLfSc12';
            rules += ' -ABNtrc-z2bZib12';
            rules += ' -ACNtrc-tQ56Od12';
        } else {
            rules += ' _ia12';
            rules += ' -yBNtrc-Nitqwc12';
            rules += ' -zBNtrc-ugAmz12';
            rules += ' -ABNtrc-j7ulPc12';
            rules += ' -ACNtrc-tQ56Od12';
        }
    } else if (props.variant === "premium") {
        if (props.isFocusVisible) {
            rules += ' _ib12';
            rules += ' -yBNtrc-1gYRFc12';
            rules += ' -zBNtrc-z2bZib12';
            rules += ' -ABNtrc-BorWLb12';
            rules += ' -ACNtrc-tQ56Od12';
        } else if (props.isPressed) {
            rules += ' _ib12';
            rules += ' -yBNtrc-1gYRFc12';
            rules += ' -zBNtrc-z2bZib12';
            rules += ' -ABNtrc-BorWLb12';
            rules += ' -ACNtrc-tQ56Od12';
        } else if (props.isHovered) {
            rules += ' _ib12';
            rules += ' -yBNtrc-1gYRFc12';
            rules += ' -zBNtrc-z2bZib12';
            rules += ' -ABNtrc-BorWLb12';
            rules += ' -ACNtrc-tQ56Od12';
        } else {
            rules += ' _ib12';
            rules += ' -yBNtrc-X7W3Sb12';
            rules += ' -zBNtrc-j7ulPc12';
            rules += ' -ABNtrc-fHZGqb12';
            rules += ' -ACNtrc-tQ56Od12';
        }
    }
    rules += ' _ilc12';
    if (props.variant === "genai") rules += ' _pb12';
    else if (props.variant === "premium") rules += ' _pb12';
    return rules;
};
function $067ea9f64ccd4e8e$export$edc9ced5c3e5ff00(isPending) {
    let [isProgressVisible, setIsProgressVisible] = (0, $7BBHC$useState)(false);
    (0, $7BBHC$useEffect)(()=>{
        let timeout;
        if (isPending) timeout = setTimeout(()=>{
            setIsProgressVisible(true);
        }, 1000);
        else setIsProgressVisible(false);
        return ()=>{
            clearTimeout(timeout);
        };
    }, [
        isPending
    ]);
    return {
        isProgressVisible: isProgressVisible
    };
}
const $067ea9f64ccd4e8e$export$353f5b6fc5456de1 = /*#__PURE__*/ (0, $7BBHC$forwardRef)(function Button(props1, ref) {
    [props1, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props1, ref, $067ea9f64ccd4e8e$export$24d547caef80ccd1);
    props1 = (0, $9b916426527cebe7$export$a6b5be5c6b451665)(props1);
    let stringFormatter = (0, $7BBHC$useLocalizedStringFormatter)((0, ($parcel$interopDefault($7BBHC$intlStringsmjs))), '@react-spectrum/s2');
    let { isPending: isPending = false, variant: variant = 'primary', fillStyle: fillStyle = 'fill', size: size = 'M', staticColor: staticColor } = props1;
    let domRef = (0, $7BBHC$useFocusableRef)(ref);
    let overlayTriggerState = (0, $7BBHC$useContext)((0, $7BBHC$OverlayTriggerStateContext));
    let { isProgressVisible: isProgressVisible } = $067ea9f64ccd4e8e$export$edc9ced5c3e5ff00(isPending);
    return /*#__PURE__*/ (0, $7BBHC$jsx)((0, $7BBHC$Button), {
        ...props1,
        ref: domRef,
        style: (0, $10ea7662e51a285b$export$56e8cba416805d8d)(domRef, props1.UNSAFE_style),
        className: (renderProps)=>(props1.UNSAFE_className || '') + $067ea9f64ccd4e8e$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, $7BBHC$jsxs)((0, $7BBHC$Fragment), {
                children: [
                    variant === 'genai' || variant === 'premium' ? /*#__PURE__*/ (0, $7BBHC$jsx)("span", {
                        className: $067ea9f64ccd4e8e$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, $7BBHC$jsxs)((0, $7BBHC$Provider), {
                        values: [
                            [
                                (0, $5ad421ec19460c48$export$74e166679b1f49ee),
                                null
                            ],
                            [
                                (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                                {
                                    styles: function anonymous(props) {
                                        let rules = " ";
                                        rules += ' TAzEcG12';
                                        rules += ' QAzEcG12';
                                        rules += ' _Jb12';
                                        if (props.isProgressVisible) rules += ' _6b12';
                                        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, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
                                {
                                    render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
                                        slot: 'icon',
                                        styles: " _Ja12"
                                    }),
                                    styles: function anonymous(props) {
                                        let rules = " ";
                                        rules += ' ZuUmpre12';
                                        rules += ' FuUmpre12';
                                        rules += ' I67logd12';
                                        rules += ' _va12';
                                        if (props.isProgressVisible) rules += ' _6b12';
                                        return rules;
                                    }({
                                        isProgressVisible: isProgressVisible
                                    })
                                }
                            ]
                        ],
                        children: [
                            typeof props1.children === 'string' ? /*#__PURE__*/ (0, $7BBHC$jsx)((0, $8e847109a6ab556d$export$5f1af8db9871e1d6), {
                                children: props1.children
                            }) : props1.children,
                            isPending && /*#__PURE__*/ (0, $7BBHC$jsx)("div", {
                                className: function anonymous(props) {
                                    let rules = " ";
                                    rules += ' _Pa12';
                                    rules += ' WF12';
                                    rules += ' _EF12';
                                    rules += ' _Zc12';
                                    if (props.isProgressVisible) rules += ' _6c12';
                                    else rules += ' _6b12';
                                    return rules;
                                }({
                                    isProgressVisible: isProgressVisible,
                                    isPending: isPending
                                }),
                                children: /*#__PURE__*/ (0, $7BBHC$jsx)((0, $41ddd91dbbf0c389$export$c79b9d6b4cc92af7), {
                                    isIndeterminate: true,
                                    "aria-label": stringFormatter.format('button.pending'),
                                    size: "S",
                                    staticColor: staticColor,
                                    styles: function anonymous(props) {
                                        let rules = " ";
                                        if (props.size === "XL") rules += ' Zo12';
                                        else if (props.size === "L") rules += ' Zm12';
                                        else if (props.size === "M") rules += ' Zl12';
                                        else if (props.size === "S") rules += ' Zk12';
                                        if (props.size === "XL") rules += ' Fp12';
                                        else if (props.size === "L") rules += ' Fn12';
                                        else if (props.size === "M") rules += ' Fm12';
                                        else if (props.size === "S") rules += ' Fl12';
                                        return rules;
                                    }({
                                        size: size
                                    })
                                })
                            })
                        ]
                    })
                ]
            })
    });
});
const $067ea9f64ccd4e8e$export$29d11c0fe2fc51d8 = /*#__PURE__*/ (0, $7BBHC$forwardRef)(function LinkButton(props, ref) {
    [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $067ea9f64ccd4e8e$export$1c1a176f3b9e48d3);
    props = (0, $9b916426527cebe7$export$a6b5be5c6b451665)(props);
    let domRef = (0, $7BBHC$useFocusableRef)(ref);
    let overlayTriggerState = (0, $7BBHC$useContext)((0, $7BBHC$OverlayTriggerStateContext));
    return /*#__PURE__*/ (0, $7BBHC$jsx)((0, $7BBHC$Link), {
        ...props,
        ref: domRef,
        style: (0, $10ea7662e51a285b$export$56e8cba416805d8d)(domRef, props.UNSAFE_style),
        className: (renderProps)=>(props.UNSAFE_className || '') + $067ea9f64ccd4e8e$var$button({
                ...renderProps,
                // Retain hover styles when an overlay is open.
                isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,
                variant: props.variant || 'primary',
                fillStyle: props.fillStyle || 'fill',
                size: props.size || 'M',
                staticColor: props.staticColor,
                isStaticColor: !!props.staticColor,
                isPending: false
            }, props.styles),
        children: /*#__PURE__*/ (0, $7BBHC$jsx)((0, $7BBHC$Provider), {
            values: [
                [
                    (0, $5ad421ec19460c48$export$74e166679b1f49ee),
                    null
                ],
                [
                    (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                    {
                        styles: " TAzEcG12 QAzEcG12 _Jb12",
                        // @ts-ignore data-attributes allowed on all JSX elements, but adding to DOMProps has been problematic in the past
                        'data-rsp-slot': 'text'
                    }
                ],
                [
                    (0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
                    {
                        render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
                            slot: 'icon',
                            styles: " _Ja12"
                        }),
                        styles: " ZuUmpre12 FuUmpre12 I67logd12 _va12"
                    }
                ]
            ],
            children: typeof props.children === 'string' ? /*#__PURE__*/ (0, $7BBHC$jsx)((0, $8e847109a6ab556d$export$5f1af8db9871e1d6), {
                children: props.children
            }) : props.children
        })
    });
});


export {$067ea9f64ccd4e8e$export$24d547caef80ccd1 as ButtonContext, $067ea9f64ccd4e8e$export$1c1a176f3b9e48d3 as LinkButtonContext, $067ea9f64ccd4e8e$export$edc9ced5c3e5ff00 as usePendingState, $067ea9f64ccd4e8e$export$353f5b6fc5456de1 as Button, $067ea9f64ccd4e8e$export$29d11c0fe2fc51d8 as LinkButton};
//# sourceMappingURL=Button.mjs.map
