import React from 'react'; import { UseGamepadsProps, UseGamepadsReturn } from '../hooks/useGamepadCore'; /** * `GamepadsProvider` mounts a single `useGamepads` polling loop and makes the * result available anywhere in the component tree via `useGamepadsContext` or * `withGamepads`. Accepts all the same props as `useGamepads`. * * ```tsx * function App() { * return ( * jump()}> * * * ); * } * ``` */ export declare const GamepadsProvider: React.FC; /** * Reads the current gamepad state from the nearest `GamepadsProvider`. * Throws a descriptive error if used outside a provider. * * ```tsx * function HUD() { * const { gamepad, buttonLabels } = useGamepadsContext(); * return

Press {buttonLabels.A} to fire

; * } * ``` */ export declare const useGamepadsContext: () => UseGamepadsReturn; /** The props injected by `withGamepads`. */ export type WithGamepadsProps = UseGamepadsReturn; /** * Higher-order component that injects gamepad state from the nearest * `GamepadsProvider` as props. Useful for class components that cannot * call hooks directly. * * ```tsx * interface Props extends WithGamepadsProps { * playerName: string; * } * * class PlayerHUD extends React.Component { * render() { * const { gamepad, buttonLabels, playerName } = this.props; * return

{playerName}: press {buttonLabels.A} to jump

; * } * } * * export default withGamepads(PlayerHUD); * * // Usage (GamepadsProvider must be an ancestor): * // * ``` */ export declare function withGamepads

(Component: React.ComponentType

): React.FC>;