import { n as FocusableOptions } from "./focusable-u2sImvln.js";
import { t as CompositeStore } from "./composite-store-9jZQUYDt.js";
import { Props } from "@ariakit/react-utils";
import { ElementType, KeyboardEvent } from "react";
import { BooleanOrCallback } from "@ariakit/utils";
//#region src/composite/composite.d.ts
declare const TagName = "div";
type TagName = typeof TagName;
/**
 * Returns props to create a `Composite` component.
 * @see https://ariakit.com/components/composite
 * @example
 * ```jsx
 * const store = useCompositeStore();
 * const props = useComposite({ store });
 * <Role {...props}>
 *   <CompositeItem>Item 1</CompositeItem>
 *   <CompositeItem>Item 2</CompositeItem>
 * </Role>
 * ```
 */
declare const useComposite: import("@ariakit/react-utils").Hook<"div", CompositeOptions<"div">>;
/**
 * Renders a composite widget.
 * @see https://ariakit.com/components/composite
 * @example
 * ```jsx
 * const composite = useCompositeStore();
 * <Composite store={composite}>
 *   <CompositeItem>Item 1</CompositeItem>
 *   <CompositeItem>Item 2</CompositeItem>
 * </Composite>
 * ```
 */
declare const Composite: (props: CompositeProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
interface CompositeOptions<T extends ElementType = TagName> extends FocusableOptions<T> {
  /**
   * Object returned by the
   * [`useCompositeStore`](https://ariakit.com/reference/use-composite-store)
   * hook. If not provided, the closest
   * [`CompositeProvider`](https://ariakit.com/reference/composite-provider)
   * component's context will be used.
   */
  store?: CompositeStore;
  /**
   * Determines how an item is scrolled into view when it's presented.
   * @private
   */
  unstable_scrollIntoView?: (element: HTMLElement) => void;
  /**
   * Determines if the component should act as a composite widget. This prop
   * needs to be set to `false` when merging various composite widgets where
   * only one should function in that manner.
   *
   * If disabled, this component will stop managing focus and keyboard
   * navigation for its items and itself. Additionally, composite ARIA
   * attributes won't be applied. These responsibilities should be taken over by
   * another composite component.
   *
   * **Note**: In most cases, this prop doesn't need to be set manually. For
   * example, when composing [Menu with
   * Combobox](https://ariakit.com/examples/menu-combobox) or [Select with
   * Combobox](https://ariakit.com/examples/select-combobox), this prop will be
   * set to `false` automatically on the
   * [`Menu`](https://ariakit.com/reference/menu) and
   * [`SelectPopover`](https://ariakit.com/reference/select-popover) components
   * so the [`Combobox`](https://ariakit.com/reference/combobox) component can
   * take over the composite widget responsibilities.
   *
   * Live examples:
   * - [Menu with Combobox](https://ariakit.com/examples/menu-combobox)
   * - [Select with Combobox](https://ariakit.com/examples/select-combobox)
   * @default true
   */
  composite?: boolean;
  /**
   * Determines whether the composite widget should move focus to an item when
   * arrow keys are pressed, given that the composite element is focused and
   * there's no active item.
   *
   * **Note**: To entirely disable focus moving within a composite widget, you
   * can use the
   * [`focusOnMove`](https://ariakit.com/reference/composite#focusonmove) prop
   * instead. If you want to control the behavior _only when arrow keys are
   * pressed_, where
   * [`focusOnMove`](https://ariakit.com/reference/composite#focusonmove) may
   * not be applicable, this prop must be set on composite items as well.
   * @default true
   * @example
   * ```jsx
   * <Composite moveOnKeyPress={false}>
   *   <CompositeItem moveOnKeyPress={false} />
   *   <CompositeItem moveOnKeyPress={false} />
   * </Composite>
   * ```
   */
  moveOnKeyPress?: BooleanOrCallback<KeyboardEvent<HTMLElement>>;
  /**
   * Determines if the active composite item should receive focus (or virtual
   * focus if the
   * [`virtualFocus`](https://ariakit.com/reference/composite-provider#virtualfocus)
   * option is enabled) when moving through items. This typically happens when
   * navigating through items with arrow keys, but it can also happen when
   * calling the
   * [`move`](https://ariakit.com/reference/use-composite-store#move) method
   * directly.
   *
   * Unlike the
   * [`composite`](https://ariakit.com/reference/composite#composite-1) prop,
   * this option doesn't disable the entire composite widget behavior. It only
   * stops this component from managing focus when navigating through items.
   *
   * **Note**: If you want to control the behavior only _when arrow keys are
   * pressed_, use the
   * [`moveOnKeyPress`](https://ariakit.com/reference/composite#moveonkeypress)
   * prop instead.
   * @default true
   */
  focusOnMove?: boolean;
  /**
   * Determines whether [Focusable](https://ariakit.com/components/focusable)
   * features are active on the composite element.
   *
   * When the store's
   * [`virtualFocus`](https://ariakit.com/reference/composite-provider#virtualfocus)
   * state is `true`, the rendered composite element must remain focusable so it
   * can own DOM focus and expose the active item through
   * `aria-activedescendant`.
   *
   * @see https://ariakit.com/reference/focusable
   */
  focusable?: FocusableOptions<T>["focusable"];
}
type CompositeProps<T extends ElementType = TagName> = Props<T, CompositeOptions<T>>;
//#endregion
export { useComposite as i, CompositeOptions as n, CompositeProps as r, Composite as t };
//# sourceMappingURL=composite-BoZZ9Es6.d.ts.map