import { AppHotkey, AppHotkeyListItem, CustomHotkeys, Hotkey, RecordedKeyPresses, RegisteredAppHotkeys } from "@tanstack/hotkeys";
/**
 * Returns the effective app hotkeys from `HotkeysProvider`, typed by
 * `Register`: each declaration with the user's custom hotkey applied.
 * Pass an entry to `useHotkey` or `useHotkeys` to register it.
 *
 * @example
 * ```tsx
 * const appHotkeys = useAppHotkeys()
 * useHotkey(appHotkeys['doc.save'], () => save())
 * ```
 */
export declare function useAppHotkeys(): RegisteredAppHotkeys;
/**
 * Lists every app hotkey with its live status, in declaration order, for
 * cheat sheets and settings screens. App hotkeys whose components have not
 * mounted are `'inactive'`; those without a hotkey are `'unbound'`.
 *
 * @example
 * ```tsx
 * function CheatSheet() {
 *   const items = useAppHotkeyList()
 *   const formatForDisplay = useFormatForDisplay()
 *
 *   return (
 *     <ul>
 *       {items.map(({ appHotkey, status }) => (
 *         <li key={appHotkey.id} data-status={status}>
 *           {appHotkey.meta?.name}:{' '}
 *           {appHotkey.hotkey ? formatForDisplay(appHotkey.hotkey) : 'Unassigned'}
 *         </li>
 *       ))}
 *     </ul>
 *   )
 * }
 * ```
 */
export declare function useAppHotkeyList(): Array<AppHotkeyListItem<RegisteredAppHotkeys[keyof RegisteredAppHotkeys]>>;
/** Custom hotkey state and actions returned by `useCustomHotkeys`. */
export interface UseCustomHotkeysResult {
  /** The user's hotkeys that differ from the defaults. */
  customHotkeys: CustomHotkeys;
  /**
   * Sets the user's hotkey for an app hotkey. `null` unbinds it.
   * Returns conflicting app hotkeys; when any exist, nothing changes. Pass
   * the recorder's `context` for a recorded hotkey, as for `findConflicts`.
   */
  setCustomHotkey: (id: keyof RegisteredAppHotkeys & string, hotkey: Hotkey | null, recordedWith?: RecordedKeyPresses) => Array<AppHotkey>;
  /** Restores the default hotkey for an app hotkey. */
  resetCustomHotkey: (id: keyof RegisteredAppHotkeys & string) => void;
  /** Restores every default hotkey. */
  resetCustomHotkeys: () => void;
  /**
   * Other app hotkeys that would collide if `id` used `hotkey`. Pass the
   * recorder's `context` for a recorded hotkey: it has the key press, which
   * also finds a hotkey written differently that the same press fires.
   */
  findConflicts: (id: keyof RegisteredAppHotkeys & string, hotkey: Hotkey, recordedWith?: RecordedKeyPresses) => Array<AppHotkey>;
}
/**
 * Reads and changes the user's custom hotkeys. Changes apply to every
 * registered app hotkey immediately and are passed to the provider's
 * `onCustomHotkeysChange`, ready to save.
 *
 * @example
 * ```tsx
 * const { setCustomHotkey, findConflicts } = useCustomHotkeys()
 * const recorder = useHotkeyRecorder({
 *   maxSteps: Infinity,
 *   validate: (hotkey, context) =>
 *     findConflicts('doc.save', hotkey, context).length === 0 ||
 *     'Already in use',
 *   onRecord: (hotkey, context) => setCustomHotkey('doc.save', hotkey, context),
 * })
 * ```
 */
export declare function useCustomHotkeys(): UseCustomHotkeysResult;