"use client";
import { useKeyboardMovementProvider } from "../movement/useKeyboardMovementProvider.js";
/**
 * @internal
 * @remarks \@since 6.0.0
 */ const getPanelsOnly = (container)=>[
        ...container.querySelectorAll(".rmd-expansion-panel__button")
    ];
/**
 * @example
 * Custom Implementation
 * ```tsx
 * import {
 *   ExpansionPanel,
 *   Form,
 *   KeyboardMovementProvider,
 *   useExpansionList,
 *   useExpansionPanels,
 * } from "@react-md/core";
 * 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>
 *   );
 * }
 * ```
 *
 * @remarks \@since 6.0.0
 */ export function useExpansionList(options = {}) {
    return useKeyboardMovementProvider({
        ...options,
        loopable: true,
        includeDisabled: true,
        getFocusableElements: getPanelsOnly
    });
}

//# sourceMappingURL=useExpansionList.js.map