import {dom as $b7b7a92703138c9b$export$df3a06d6289f983e, useContextProps as $b7b7a92703138c9b$export$29f1550f4b0d4415, useRenderProps as $b7b7a92703138c9b$export$4d86445c2cf5e3} from "./utils.js";
import {SharedElementTransition as $347bc273c4058e94$export$758399f318e6385a} from "./SharedElementTransition.js";
import {useToggleButtonGroup as $goXcO$useToggleButtonGroup} from "react-aria/useToggleButtonGroup";
import {filterDOMProps as $goXcO$filterDOMProps} from "react-aria/private/utils/filterDOMProps";
import {mergeProps as $goXcO$mergeProps} from "react-aria/mergeProps";
import $goXcO$react, {createContext as $goXcO$createContext, forwardRef as $goXcO$forwardRef} from "react";
import {useToggleGroupState as $goXcO$useToggleGroupState} from "react-stately/useToggleGroupState";

/*
 * 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 $e80299348b6d9861$export$298258635ae0dd97 = /*#__PURE__*/ (0, $goXcO$createContext)({});
const $e80299348b6d9861$export$a8a71863db173133 = /*#__PURE__*/ (0, $goXcO$createContext)(null);
const $e80299348b6d9861$export$40258cc1d95ff477 = /*#__PURE__*/ (0, $goXcO$forwardRef)(function ToggleButtonGroup(props, ref) {
    [props, ref] = (0, $b7b7a92703138c9b$export$29f1550f4b0d4415)(props, ref, $e80299348b6d9861$export$298258635ae0dd97);
    let state = (0, $goXcO$useToggleGroupState)(props);
    let { groupProps: groupProps } = (0, $goXcO$useToggleButtonGroup)(props, state, ref);
    let renderProps = (0, $b7b7a92703138c9b$export$4d86445c2cf5e3)({
        ...props,
        values: {
            orientation: props.orientation || 'horizontal',
            isDisabled: state.isDisabled,
            state: state
        },
        defaultClassName: 'react-aria-ToggleButtonGroup'
    });
    let DOMProps = (0, $goXcO$filterDOMProps)(props, {
        global: true
    });
    return /*#__PURE__*/ (0, $goXcO$react).createElement((0, $b7b7a92703138c9b$export$df3a06d6289f983e).div, {
        ...(0, $goXcO$mergeProps)(DOMProps, renderProps, groupProps),
        ref: ref,
        slot: props.slot || undefined,
        "data-orientation": props.orientation || 'horizontal',
        "data-disabled": props.isDisabled || undefined
    }, /*#__PURE__*/ (0, $goXcO$react).createElement($e80299348b6d9861$export$a8a71863db173133.Provider, {
        value: state
    }, /*#__PURE__*/ (0, $goXcO$react).createElement((0, $347bc273c4058e94$export$758399f318e6385a), null, renderProps.children)));
});


export {$e80299348b6d9861$export$298258635ae0dd97 as ToggleButtonGroupContext, $e80299348b6d9861$export$a8a71863db173133 as ToggleGroupStateContext, $e80299348b6d9861$export$40258cc1d95ff477 as ToggleButtonGroup};
//# sourceMappingURL=ToggleButtonGroup.js.map
