import React from 'react'; import PropTypes from 'prop-types'; import type { ClientOpts, ClientState, _ClientImpl } from './client'; import type { Ctx } from '../types'; declare type WrappedBoardDelegates = 'matchID' | 'playerID' | 'credentials'; export declare type WrappedBoardProps = Pick; declare type ExposedClientProps = Pick<_ClientImpl, 'log' | 'moves' | 'events' | 'reset' | 'undo' | 'redo' | 'playerID' | 'matchID' | 'matchData' | 'sendChatMessage'>; export declare type BoardProps = ClientState & Omit> & ExposedClientProps & { isMultiplayer: boolean; }; declare type ReactClientOpts = BoardProps, CtxWithPlugins extends Ctx = Ctx> = Omit, WrappedBoardDelegates> & { board?: React.ComponentType

; loading?: React.ComponentType; }; /** * Client * * boardgame.io React client. * * @param {...object} game - The return value of `Game`. * @param {...object} numPlayers - The number of players. * @param {...object} board - The React component for the game. * @param {...object} loading - (optional) The React component for the loading state. * @param {...object} multiplayer - Set to a falsy value or a transportFactory, e.g., SocketIO() * @param {...object} debug - Enables the Debug UI. * @param {...object} enhancer - Optional enhancer to send to the Redux store * * Returns: * A React component that wraps board and provides an * API through props for it to interact with the framework * and dispatch actions such as MAKE_MOVE, GAME_EVENT, RESET, * UNDO and REDO. */ export declare function Client = BoardProps, ContextWithPlugins extends Ctx = Ctx>(opts: ReactClientOpts): { new (props: Pick, "matchID" | "playerID" | "credentials" | "debug"> & Pick>): { client: _ClientImpl; unsubscribe?: () => void; componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate(prevProps: Pick, "matchID" | "playerID" | "credentials" | "debug"> & Pick>): void; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "matchID" | "playerID" | "credentials" | "debug"> & Pick>>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void; forceUpdate(callback?: () => void): void; readonly props: Readonly, "matchID" | "playerID" | "credentials" | "debug"> & Pick>> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly, "matchID" | "playerID" | "credentials" | "debug"> & Pick>>, nextState: Readonly<{}>, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, "matchID" | "playerID" | "credentials" | "debug"> & Pick>>, prevState: Readonly<{}>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, "matchID" | "playerID" | "credentials" | "debug"> & Pick>>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "matchID" | "playerID" | "credentials" | "debug"> & Pick>>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, "matchID" | "playerID" | "credentials" | "debug"> & Pick>>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, "matchID" | "playerID" | "credentials" | "debug"> & Pick>>, nextState: Readonly<{}>, nextContext: any): void; }; propTypes: { matchID: PropTypes.Requireable; playerID: PropTypes.Requireable; credentials: PropTypes.Requireable; debug: PropTypes.Requireable; }; defaultProps: { matchID: string; playerID: any; credentials: any; debug: boolean; }; contextType?: React.Context; }; export {};