import { BP } from "@betswirl/sdk-core"; import React from "react"; import { BetStatus, GameChoice, GameDefinition, GameResult, HistoryEntry, Theme, TokenWithImage } from "../types/types"; interface UseGameLogicProps { gameDefinition?: GameDefinition; backgroundImage: string; } interface UseGameLogicResult { isConfigurationLoading: boolean; gameDefinition: GameDefinition | undefined; isWalletConnected: boolean; address: string | undefined; balance: bigint; token: TokenWithImage; areChainsSynced: boolean; gameHistory: HistoryEntry[]; refreshHistory: () => void; refetchBalance: () => void; betAmount: bigint | undefined; setBetAmount: (amount: bigint | undefined) => void; selection: T | undefined; setSelection: (selection: T) => void; betStatus: BetStatus; gameResult: GameResult | null; resetBetState: () => void; vrfFees: bigint; formattedVrfFees: number | string; gasPrice: string; targetPayoutAmount: bigint; formattedNetMultiplier: number; grossMultiplier: BP; isInGameResultState: boolean; isGamePaused: boolean; nativeCurrencySymbol: string; themeSettings: { theme: Theme; customTheme?: { "--primary"?: string; "--play-btn-font"?: string; "--connect-btn-font"?: string; "--game-window-overlay"?: string; } & React.CSSProperties; backgroundImage: string; }; handlePlayButtonClick: () => void; handleBetAmountChange: (amount: bigint | undefined) => void; placeBet: (betAmount: bigint, choice: T) => void; needsTokenApproval: boolean; isApprovePending: boolean; isApproveConfirming: boolean; approveToken: () => Promise; isRefetchingAllowance: boolean; approveError: Error | null; } /** * Centralizes casino game logic including bet placement, result tracking, and UI state. * Manages the complete game flow from selection to payout calculation. * * @param gameType - Type of casino game (coin toss or dice) * @param defaultSelection - Initial game selection * @param backgroundImage - Game background image URL * @returns Complete game state and control functions * * @example * ```ts * const gameLogic = useGameLogic({ * gameType: CASINO_GAME_TYPE.DICE, * defaultSelection: 1, * backgroundImage: '/assets/dice-bg.png' * }) * * // Place bet when ready * gameLogic.handlePlayButtonClick() * ``` */ export declare function useGameLogic({ gameDefinition, backgroundImage, }: UseGameLogicProps): UseGameLogicResult; export {};