import "./TabsPicker.css";
import {centerBaseline as $1f4b04be3f24aae3$export$9d7e2342a7e53afa} from "./CenterBaseline.mjs";
import {checkmark as $13afb0ea5f0ed767$export$292abbf31ed842a, description as $13afb0ea5f0ed767$export$6d59db4903f20f7d, icon as $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27, label as $13afb0ea5f0ed767$export$1237798dc640739a, menuitem as $13afb0ea5f0ed767$export$f68e44d881264486, sectionHeader as $13afb0ea5f0ed767$export$562e61a0817eb32e, sectionHeading as $13afb0ea5f0ed767$export$300ac6f106ef584d} from "./Menu.mjs";
import $81cf3d4588736e7d$export$2e2bcd8739ae039 from "./Checkmark.mjs";
import $4b69f02ec06b9226$export$2e2bcd8739ae039 from "./Chevron.mjs";
import {FieldLabel as $9afd80978c252040$export$1acdcf5a973a8414} from "./Field.mjs";
import {HeaderContext as $8e847109a6ab556d$export$e0e4026c12a8bdbb, HeadingContext as $8e847109a6ab556d$export$d688439359537581, Text as $8e847109a6ab556d$export$5f1af8db9871e1d6, TextContext as $8e847109a6ab556d$export$9afb8bc826b033ea} from "./Content.mjs";
import {IconContext as $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed} from "../icons/Icon.mjs";
import {Popover as $88b746eba92c8d0d$export$5b6b19405a83ff9d} from "./Popover.mjs";
import {pressScale as $10ea7662e51a285b$export$56e8cba416805d8d} from "./pressScale.mjs";
import {useFormProps as $9b916426527cebe7$export$a6b5be5c6b451665} from "./Form.mjs";
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
import {jsxs as $vecDw$jsxs, jsx as $vecDw$jsx, Fragment as $vecDw$Fragment} from "react/jsx-runtime";
import {Select as $vecDw$Select, Button as $vecDw$Button, SelectValue as $vecDw$SelectValue, Provider as $vecDw$Provider, DEFAULT_SLOT as $vecDw$DEFAULT_SLOT, ListBox as $vecDw$ListBox, ListBoxItem as $vecDw$ListBoxItem} from "react-aria-components";
import {useLocale as $vecDw$useLocale} from "react-aria";
import {createContext as $vecDw$createContext, forwardRef as $vecDw$forwardRef, useRef as $vecDw$useRef, useContext as $vecDw$useContext} from "react";
import {useFocusableRef as $vecDw$useFocusableRef} 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 $0067ea932a992b6a$export$b72b8dade9393cd5 = /*#__PURE__*/ (0, $vecDw$createContext)(null);
const $0067ea932a992b6a$var$inputButton = function anonymous(props) {
    let rules = " ";
    if (props.isFocusVisible) rules += ' _Lf11';
    else rules += ' _Le11';
    rules += ' Oh11';
    rules += ' Olc11';
    rules += ' _Mc11';
    rules += ' _Kd11';
    rules += ' zXcEWr11';
    rules += ' yXcEWr11';
    rules += ' BXcEWr11';
    rules += ' AXcEWr11';
    if (props.size === "XL") rules += ' Nl11';
    else if (props.size === "L") rules += ' Nj11';
    else if (props.size === "S") rules += ' Nf11';
    else if (props.size === "XS") rules += ' Ne11';
    else rules += ' Nk11';
    if (props.isQuiet) rules += ' _qd11';
    else rules += ' _qtb11';
    if (props.size === "XL") rules += ' -Anxdcc-Zt11';
    else if (props.size === "L") rules += ' -Anxdcc-ZStdtne11';
    else if (props.size === "S") rules += ' -Anxdcc-Zr11';
    else rules += ' -Anxdcc-Z3fn9H11';
    rules += ' __v6TNLWb11';
    rules += ' _Pc11';
    rules += ' uk11';
    rules += ' ucJ9TBTb11';
    rules += ' ud3Euai11';
    rules += ' uea11';
    rules += ' ugb11';
    rules += ' uhd11';
    rules += ' uje11';
    rules += ' u2NhKxcl11';
    rules += ' uic11';
    rules += ' -_6BNtrc-c11';
    rules += ' vx11';
    rules += ' xb11';
    rules += ' _xa11';
    rules += ' _Fd11';
    rules += ' _FnuYUweb11';
    if (props.isDisabled) rules += ' pp11';
    else {
        if (props.isPressed) rules += ' po11';
        else if (props.isFocusVisible) rules += ' po11';
        else if (props.isHovered) rules += ' po11';
        else rules += ' pt11';
    }
    rules += ' sd11';
    rules += ' _Wd11';
    rules += ' _je11';
    rules += ' oa11';
    rules += ' na11';
    rules += ' ka11';
    rules += ' ja11';
    rules += ' eb11';
    rules += ' Yd11';
    rules += ' Xb11';
    rules += ' _2b11';
    rules += ' qc11';
    rules += ' qsd11';
    rules += ' SMBFGYc11';
    rules += ' RfBFGYc11';
    rules += ' g911';
    if (props.isQuiet) rules += ' Ln11';
    rules += ' __ca11';
    if (props.density === "compact") rules += ' Fx11';
    else rules += ' Fz11';
    rules += ' _oa11';
    rules += ' -S_-Sd11';
    rules += ' -R_-Rd11';
    return rules;
};
let $0067ea932a992b6a$export$b1e5508a851be14d = function anonymous(props) {
    let rules = " ";
    rules += ' _Le11';
    rules += ' se11';
    rules += ' Deb5jcb11';
    rules += ' _oa11';
    rules += ' Za11';
    rules += ' K40ub4c11';
    rules += ' _Na11';
    rules += ' Pa11';
    rules += ' Tt11';
    rules += ' Qt11';
    rules += ' St11';
    rules += ' Rt11';
    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';
    }
    return rules;
};
const $0067ea932a992b6a$var$valueStyles = " _ua11 _Nc11 Pc11 _Yb11 _7c11 sd11 eb11 Fb11";
const $0067ea932a992b6a$var$iconStyles = " _va11 _Sd11 -_8sjo0b-t5ZbAob11";
const $0067ea932a992b6a$var$iconCenterWrapper = function anonymous(props) {
    let rules = " ";
    rules += ' sd11';
    rules += ' z2U5Crc11';
    rules += ' y2U5Crc11';
    rules += ' B2U5Crc11';
    rules += ' A2U5Crc11';
    if (props.labelBehavior === "hide") rules += ' SssxDec11';
    return rules;
};
let $0067ea932a992b6a$var$InsideSelectValueContext = /*#__PURE__*/ (0, $vecDw$createContext)(false);
function $0067ea932a992b6a$var$Picker(props1, ref) {
    [props1, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props1, ref, $0067ea932a992b6a$export$b72b8dade9393cd5);
    let domRef = (0, $vecDw$useFocusableRef)(ref);
    props1 = (0, $9b916426527cebe7$export$a6b5be5c6b451665)(props1);
    let { direction: direction = 'bottom', align: align = 'start', shouldFlip: shouldFlip = true, children: children, items: items, density: density, labelBehavior: labelBehavior = 'show', valueId: valueId, ...pickerProps } = props1;
    let isQuiet = true;
    const menuOffset = 6;
    const size = 'M';
    let ariaLabelledby = props1['aria-labelledby'] ?? '';
    let { direction: dir } = (0, $vecDw$useLocale)();
    let RTLFlipOffset = dir === 'rtl' ? -1 : 1;
    return /*#__PURE__*/ (0, $vecDw$jsxs)("div", {
        children: [
            /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$Select), {
                ...pickerProps,
                className: "",
                "aria-labelledby": `${labelBehavior === 'hide' ? valueId : ''} ${ariaLabelledby}`,
                children: ({ isOpen: isOpen })=>/*#__PURE__*/ (0, $vecDw$jsxs)((0, $vecDw$Fragment), {
                        children: [
                            /*#__PURE__*/ (0, $vecDw$jsx)((0, $9afd80978c252040$export$1acdcf5a973a8414), {
                                isQuiet: isQuiet
                            }),
                            /*#__PURE__*/ (0, $vecDw$jsxs)((0, $vecDw$Button), {
                                ref: domRef,
                                style: (renderProps)=>(0, $10ea7662e51a285b$export$56e8cba416805d8d)(domRef)(renderProps),
                                // Prevent press scale from sticking while Picker is open.
                                // @ts-ignore
                                isPressed: false,
                                className: (renderProps)=>$0067ea932a992b6a$var$inputButton({
                                        ...renderProps,
                                        size: 'M',
                                        isOpen: isOpen,
                                        isQuiet: isQuiet,
                                        density: density
                                    }),
                                children: [
                                    /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$SelectValue), {
                                        className: $0067ea932a992b6a$var$valueStyles + ' ' + "WzII9b",
                                        children: ({ defaultChildren: defaultChildren })=>{
                                            return /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$Provider), {
                                                values: [
                                                    [
                                                        (0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
                                                        {
                                                            slots: {
                                                                icon: {
                                                                    render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
                                                                        slot: 'icon',
                                                                        styles: $0067ea932a992b6a$var$iconCenterWrapper({
                                                                            labelBehavior: labelBehavior
                                                                        })
                                                                    }),
                                                                    styles: (0, $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27)
                                                                }
                                                            }
                                                        }
                                                    ],
                                                    [
                                                        (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                                                        {
                                                            slots: {
                                                                // Default slot is useful when converting other collections to PickerItems.
                                                                [(0, $vecDw$DEFAULT_SLOT)]: {
                                                                    id: valueId,
                                                                    styles: function anonymous(props) {
                                                                        let rules = " ";
                                                                        if (props.labelBehavior === "hide") rules += ' sk11';
                                                                        else rules += ' sb11';
                                                                        rules += ' _ub11';
                                                                        rules += ' _Nc11';
                                                                        rules += ' Pc11';
                                                                        rules += ' _Yb11';
                                                                        rules += ' _7c11';
                                                                        return rules;
                                                                    }({
                                                                        labelBehavior: labelBehavior
                                                                    })
                                                                }
                                                            }
                                                        }
                                                    ],
                                                    [
                                                        $0067ea932a992b6a$var$InsideSelectValueContext,
                                                        true
                                                    ]
                                                ],
                                                children: defaultChildren
                                            });
                                        }
                                    }),
                                    /*#__PURE__*/ (0, $vecDw$jsx)((0, $4b69f02ec06b9226$export$2e2bcd8739ae039), {
                                        size: size,
                                        className: $0067ea932a992b6a$var$iconStyles
                                    })
                                ]
                            }),
                            /*#__PURE__*/ (0, $vecDw$jsx)((0, $88b746eba92c8d0d$export$5b6b19405a83ff9d), {
                                hideArrow: true,
                                offset: menuOffset,
                                crossOffset: RTLFlipOffset * -12,
                                placement: `${direction} ${align}`,
                                shouldFlip: shouldFlip,
                                styles: " Nh11 ZbWuche11",
                                children: /*#__PURE__*/ (0, $vecDw$jsx)("div", {
                                    className: " sd11 Za11 Fb11",
                                    children: /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$Provider), {
                                        values: [
                                            [
                                                (0, $8e847109a6ab556d$export$e0e4026c12a8bdbb),
                                                {
                                                    styles: (0, $13afb0ea5f0ed767$export$562e61a0817eb32e)({
                                                        size: size
                                                    })
                                                }
                                            ],
                                            [
                                                (0, $8e847109a6ab556d$export$d688439359537581),
                                                {
                                                    // @ts-ignore
                                                    role: 'presentation',
                                                    styles: (0, $13afb0ea5f0ed767$export$300ac6f106ef584d)
                                                }
                                            ],
                                            [
                                                (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                                                {
                                                    slots: {
                                                        description: {
                                                            styles: (0, $13afb0ea5f0ed767$export$6d59db4903f20f7d)({
                                                                size: size
                                                            })
                                                        }
                                                    }
                                                }
                                            ]
                                        ],
                                        children: /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$ListBox), {
                                            items: items,
                                            className: $0067ea932a992b6a$export$b1e5508a851be14d,
                                            children: children
                                        })
                                    })
                                })
                            })
                        ]
                    })
            }),
            /*#__PURE__*/ (0, $vecDw$jsx)($0067ea932a992b6a$var$TabLine, {
                isDisabled: props1.isDisabled
            })
        ]
    });
}
/**
 * Pickers allow users to choose a single option from a collapsible list of options when space is limited.
 */ let $0067ea932a992b6a$export$ba25329847403e11 = /*#__PURE__*/ (0, $vecDw$forwardRef)($0067ea932a992b6a$var$Picker);
const $0067ea932a992b6a$var$selectedIndicator = function anonymous(props) {
    let rules = " ";
    if (props.isDisabled) rules += ' gH11';
    else rules += ' g011';
    if (props.isDisabled) rules += ' gld11';
    else rules += ' gle11';
    rules += ' FLvNfn11';
    rules += ' _je11';
    rules += ' og11';
    rules += ' ng11';
    rules += ' kg11';
    rules += ' jg11';
    rules += ' Jk7Otrc11';
    rules += ' Xa11';
    rules += ' _2b11';
    return rules;
};
function $0067ea932a992b6a$var$TabLine(props) {
    return /*#__PURE__*/ (0, $vecDw$jsx)("div", {
        className: $0067ea932a992b6a$var$selectedIndicator(props)
    });
}
function $0067ea932a992b6a$export$d601881f38163e28(props) {
    let ref = (0, $vecDw$useRef)(null);
    let isLink = props.href != null;
    const size = 'M';
    return /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$ListBoxItem), {
        ...props,
        ref: ref,
        textValue: props.textValue || (typeof props.children === 'string' ? props.children : undefined),
        style: (0, $10ea7662e51a285b$export$56e8cba416805d8d)(ref, props.UNSAFE_style),
        className: (renderProps)=>(props.UNSAFE_className || '') + (0, $13afb0ea5f0ed767$export$f68e44d881264486)({
                ...renderProps,
                size: size,
                isLink: isLink
            }, props.styles),
        children: (renderProps)=>{
            let { children: children } = props;
            return /*#__PURE__*/ (0, $vecDw$jsx)($0067ea932a992b6a$var$DefaultProvider, {
                context: (0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
                value: {
                    slots: {
                        icon: {
                            render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
                                slot: 'icon',
                                styles: $0067ea932a992b6a$var$iconCenterWrapper({})
                            }),
                            styles: (0, $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27)
                        }
                    }
                },
                children: /*#__PURE__*/ (0, $vecDw$jsxs)($0067ea932a992b6a$var$DefaultProvider, {
                    context: (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                    value: {
                        slots: {
                            [(0, $vecDw$DEFAULT_SLOT)]: {
                                styles: (0, $13afb0ea5f0ed767$export$1237798dc640739a)({
                                    size: size
                                })
                            }
                        }
                    },
                    children: [
                        !isLink && /*#__PURE__*/ (0, $vecDw$jsx)((0, $81cf3d4588736e7d$export$2e2bcd8739ae039), {
                            size: size,
                            className: (0, $13afb0ea5f0ed767$export$292abbf31ed842a)({
                                ...renderProps,
                                size: size
                            })
                        }),
                        typeof children === 'string' ? /*#__PURE__*/ (0, $vecDw$jsx)((0, $8e847109a6ab556d$export$5f1af8db9871e1d6), {
                            children: children
                        }) : children
                    ]
                })
            });
        }
    });
}
// A Context.Provider that only sets a value if not inside SelectValue.
function $0067ea932a992b6a$var$DefaultProvider({ context: context, value: value, children: children }) {
    let inSelectValue = (0, $vecDw$useContext)($0067ea932a992b6a$var$InsideSelectValueContext);
    if (inSelectValue) return children;
    return /*#__PURE__*/ (0, $vecDw$jsx)(context.Provider, {
        value: value,
        children: children
    });
}


export {$0067ea932a992b6a$export$b72b8dade9393cd5 as PickerContext, $0067ea932a992b6a$export$b1e5508a851be14d as menu, $0067ea932a992b6a$export$ba25329847403e11 as Picker, $0067ea932a992b6a$export$d601881f38163e28 as PickerItem};
//# sourceMappingURL=TabsPicker.mjs.map
