import { Options, Props } from "@ariakit/react-utils";
import { ElementType, SyntheticEvent } from "react";
import { BivariantCallback } from "@ariakit/utils";
//#region src/focusable/focusable.d.ts
declare const TagName = "div";
type TagName = typeof TagName;
/**
 * Returns props to create a `Focusable` component.
 * @see https://ariakit.com/components/focusable
 * @example
 * ```jsx
 * const props = useFocusable();
 * <Role {...props}>Focusable</Role>
 * ```
 */
declare const useFocusable: import("@ariakit/react-utils").Hook<"div", FocusableOptions<"div">>;
/**
 * Renders a focusable element. When this element gains keyboard focus, it gets
 * a
 * [`data-focus-visible`](https://ariakit.com/guide/styling#data-focus-visible)
 * attribute and triggers the
 * [`onFocusVisible`](https://ariakit.com/reference/focusable#onfocusvisible)
 * prop.
 *
 * The `Focusable` component supports the
 * [`disabled`](https://ariakit.com/reference/focusable#disabled) prop for all
 * elements, even those not supporting the native `disabled` attribute. Disabled
 * elements using the `Focusable` component may be still accessible via keyboard
 * by using the the
 * [`accessibleWhenDisabled`](https://ariakit.com/reference/focusable#accessiblewhendisabled)
 * prop.
 * @see https://ariakit.com/components/focusable
 * @example
 * ```jsx
 * <Focusable>Focusable</Focusable>
 * ```
 */
declare const Focusable: (props: FocusableProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
interface FocusableOptions<_T extends ElementType = TagName> extends Options {
  /**
   * Determines if the element is disabled. This sets the `aria-disabled`
   * attribute accordingly, enabling support for all elements, including those
   * that don't support the native `disabled` attribute.
   *
   * This feature can be combined with the
   * [`accessibleWhenDisabled`](https://ariakit.com/reference/focusable#accessiblewhendisabled)
   * prop to make disabled elements still accessible via keyboard.
   *
   * **Note**: For this prop to work, the
   * [`focusable`](https://ariakit.com/reference/command#focusable) prop must be
   * set to `true`, if it's not set by default.
   *
   * Live examples:
   * - [Submenu](https://ariakit.com/examples/menu-nested)
   * - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs)
   * - [Context Menu](https://ariakit.com/examples/menu-context-menu)
   * @default false
   */
  disabled?: boolean;
  /**
   * Automatically focuses the element upon mounting, similar to the native
   * `autoFocus` prop. This addresses an issue where the element with the native
   * `autoFocus` attribute might receive focus before React effects are
   * executed.
   *
   * The `autoFocus` prop can also be used with
   * [Focusable](https://ariakit.com/components/focusable) elements within a
   * [Dialog](https://ariakit.com/components/dialog) component, establishing the
   * initial focus as the dialog opens.
   *
   * **Note**: For this prop to work, the
   * [`focusable`](https://ariakit.com/reference/command#focusable) prop must be
   * set to `true`, if it's not set by default.
   *
   * Live examples:
   * - [Warning on Dialog
   *   hide](https://ariakit.com/examples/dialog-hide-warning)
   * - [Dialog with React
   *   Router](https://ariakit.com/examples/dialog-react-router)
   * - [Nested Dialog](https://ariakit.com/examples/dialog-nested)
   * @default false
   */
  autoFocus?: boolean;
  /**
   * Determines if [Focusable](https://ariakit.com/components/focusable)
   * features should be active on non-native focusable elements.
   *
   * **Note**: This prop only turns off the additional features provided by the
   * [`Focusable`](https://ariakit.com/reference/focusable) component.
   * Non-native focusable elements will lose their focusability entirely.
   * However, native focusable elements will retain their inherent focusability,
   * but without added features such as improved
   * [`autoFocus`](https://ariakit.com/reference/focusable#autofocus),
   * [`accessibleWhenDisabled`](https://ariakit.com/reference/focusable#accessiblewhendisabled),
   * [`onFocusVisible`](https://ariakit.com/reference/focusable#onfocusvisible),
   * etc.
   * @default true
   */
  focusable?: boolean;
  /**
   * Indicates whether the element should be focusable even when it is
   * [`disabled`](https://ariakit.com/reference/focusable#disabled).
   *
   * This is important when discoverability is a concern. For example:
   *
   * > A toolbar in an editor contains a set of special smart paste functions
   * that are disabled when the clipboard is empty or when the function is not
   * applicable to the current content of the clipboard. It could be helpful to
   * keep the disabled buttons focusable if the ability to discover their
   * functionality is primarily via their presence on the toolbar.
   *
   * Learn more on [Focusability of disabled
   * controls](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols).
   *
   * Live examples:
   * - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs)
   * - [Command Menu with
   *   Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
   */
  accessibleWhenDisabled?: boolean;
  /**
   * Custom event handler invoked when the element gains focus through keyboard
   * interaction or a key press occurs while the element is in focus. This is
   * the programmatic equivalent of the
   * [`data-focus-visible`](https://ariakit.com/guide/styling#data-focus-visible)
   * attribute.
   *
   * **Note**: For this prop to work, the
   * [`focusable`](https://ariakit.com/reference/command#focusable) prop must be
   * set to `true`, if it's not set by default.
   *
   * Live examples:
   * - [Navigation Menubar](https://ariakit.com/examples/menubar-navigation)
   * - [Custom Checkbox](https://ariakit.com/examples/checkbox-custom)
   */
  onFocusVisible?: BivariantCallback<(event: SyntheticEvent<HTMLElement>) => void>;
}
type FocusableProps<T extends ElementType = TagName> = Props<T, FocusableOptions<T>>;
//#endregion
export { useFocusable as i, FocusableOptions as n, FocusableProps as r, Focusable as t };
//# sourceMappingURL=focusable-u2sImvln.d.ts.map