"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { KeyboardMovementProvider } from "../movement/useKeyboardMovementProvider.js";
import { useExpansionList } from "./useExpansionList.js";
/**
 * **Client Component**
 *
 * This component is only used to implement the keyboard movement behavior for
 * the `ExpansionPanel` components.
 *
 * @see {@link useExpansionList} for a custom implementation example if you do
 * not want to use a `<div>` for this wrapper component.
 * @remarks \@since 6.0.0 Uses the new keyboard movement API and does not
 * require the `onKeyDOwn` prop to be provided.
 */ export const ExpansionList = /*#__PURE__*/ forwardRef(function ExpansionList(props, ref) {
    const { onClick, onFocus, onKeyDown, children, ...remaining } = props;
    const { movementContext, movementProps } = useExpansionList({
        onClick,
        onFocus,
        onKeyDown
    });
    return /*#__PURE__*/ _jsx(KeyboardMovementProvider, {
        value: movementContext,
        children: /*#__PURE__*/ _jsx("div", {
            ...remaining,
            ...movementProps,
            ref: ref,
            children: children
        })
    });
});

//# sourceMappingURL=ExpansionList.js.map