"use client";
import { useKeyboardMovementProvider } from "../movement/useKeyboardMovementProvider.js";
/**
 * @internal
 * @since 6.0.0
 */ const getPanelsOnly = (container)=>[
        ...container.querySelectorAll(".rmd-expansion-panel__button")
    ];
/**
 * @example Custom Implementation
 * ```tsx
 * import { ExpansionPanel } from "@react-md/core/expansion-panel/ExpansionPanel";
 * import { useExpansionList } from "@react-md/core/expansion-panel/useExpansionList";
 * import { useExpansionPanels } from "@react-md/core/expansion-panel/useExpansionPanels";
 * import { KeyboardMovementProvider } from "@react-md/core/movement/useKeyboardMovementProvider";
 * import { Form } from "@react-md/core/form/Form";
 * import { type ReactElement } from "react";
 *
 * import { BillingAddress } from "./BillingAddress";
 * import { BillingInformation } from "./BillingInformation";
 * import { PersonalInformation } from "./PersonalInformation";
 *
 * function Example(): ReactElement {
 *   const { movementContext, movementProps } = useExpansionList();
 *   const { getPanelProps } = useExpansionPanels();
 *
 *   return (
 *     <KeyboardMovementProvider value={movementContext}>
 *       <Form {...movementProps}>
 *         <ExpansionPanel {...getPanelProps("personal-information-panel")}>
 *           <PersonalInformation />
 *         </ExpansionPanel>
 *         <ExpansionPanel {...getPanelProps("billing-information-panel")}>
 *           <BillingInformation />
 *         </ExpansionPanel>
 *         <ExpansionPanel {...getPanelProps("billing-address-panel")}>
 *           <BillingAddress />
 *         </ExpansionPanel>
 *       </Form>
 *     </KeyboardMovementProvider>
 *   );
 * }
 * ```
 *
 * @see {@link https://react-md.dev/components/expansion-panel | ExpansionPanel Demos}
 * @since 6.0.0
 */ export function useExpansionList(options = {}) {
    return useKeyboardMovementProvider({
        ...options,
        loopable: true,
        includeDisabled: true,
        getFocusableElements: getPanelsOnly
    });
}

//# sourceMappingURL=useExpansionList.js.map