part of 'prediction_bloc.dart'; abstract class PredictionEvent extends Equatable { const PredictionEvent(); @override List get props => []; } class PredictionLoadRequested extends PredictionEvent { const PredictionLoadRequested(); } class PredictionIntervalChanged extends PredictionEvent { const PredictionIntervalChanged(this.minutes); final int minutes; @override List get props => [minutes]; } class PredictionStakeSelected extends PredictionEvent { const PredictionStakeSelected(this.stake); final double stake; @override List get props => [stake]; } class PredictionDirectionSelected extends PredictionEvent { const PredictionDirectionSelected(this.direction); final String direction; @override List get props => [direction]; } class PredictionStakeAccountChanged extends PredictionEvent { const PredictionStakeAccountChanged(this.kind); final StakeAccountKind kind; @override List get props => [kind]; } class PredictionPlayModeChanged extends PredictionEvent { const PredictionPlayModeChanged(this.mode); final PredictionPlayMode mode; @override List get props => [mode]; } class PredictionMultiLevelSelected extends PredictionEvent { const PredictionMultiLevelSelected(this.level); final MultiLevelModel level; @override List get props => [level]; } class PredictionMultiDirectionToggled extends PredictionEvent { const PredictionMultiDirectionToggled(this.index); final int index; @override List get props => [index]; } class PredictionPlaceBetRequested extends PredictionEvent { const PredictionPlaceBetRequested(); } class PredictionPlaceMultiBetRequested extends PredictionEvent { const PredictionPlaceMultiBetRequested(); } class PredictionAutoSaveRequested extends PredictionEvent { const PredictionAutoSaveRequested(this.body); final Map body; @override List get props => [body]; } class PredictionRefreshTick extends PredictionEvent { const PredictionRefreshTick({this.forceGameState = false}); /// When true, always re-fetch `/state` even if WebSocket is healthy. /// Used when a new betting window opens so `userBet` unlocks promptly. final bool forceGameState; @override List get props => [forceGameState]; } class PredictionWsMessageReceived extends PredictionEvent { const PredictionWsMessageReceived(this.message); final Map message; @override List get props => [message]; } class PredictionSocketStatusChanged extends PredictionEvent { const PredictionSocketStatusChanged(this.status); final GameSocketConnectionState status; @override List get props => [status]; } class PredictionHistoryPageRequested extends PredictionEvent { const PredictionHistoryPageRequested( this.page, { this.append = false, }); final int page; final bool append; @override List get props => [page, append]; } class PredictionHistoryFilterChanged extends PredictionEvent { const PredictionHistoryFilterChanged({ this.walletFilter, this.statusFilter, }); /// Full filter snapshot. `null` means no filter for that dimension. final String? walletFilter; final String? statusFilter; @override List get props => [walletFilter, statusFilter]; } class PredictionCandlesOlderRequested extends PredictionEvent { const PredictionCandlesOlderRequested(); } /// Pause HTTP polling when leaving the prediction screen (bloc is app-scoped). class PredictionPaused extends PredictionEvent { const PredictionPaused(); } /// Resume polling / reload when entering the prediction screen. class PredictionResumed extends PredictionEvent { const PredictionResumed(); } /// Fired when the OS brings the app back to the foreground (screen unlock, /// app switcher return, etc.) while already on the prediction screen. /// /// Unlike [PredictionResumed] (screen navigation), this does NOT trust that /// the existing WebSocket connection / poll timer chain are still healthy: /// mobile OSes routinely suspend timers and silently drop sockets while /// backgrounded without ever firing `onDone`/`onError`, so `isConnected` can /// stay (wrongly) true. This forces a verified-fresh reconnect + full resync. class PredictionAppResumed extends PredictionEvent { const PredictionAppResumed(); } /// Reload main / bonus / test wallet labels for the stake selector. class PredictionBalancesRefreshRequested extends PredictionEvent { const PredictionBalancesRefreshRequested(); } /// Clear one-shot UI feedback (error snackbar / bet-placed toast). class PredictionFeedbackConsumed extends PredictionEvent { const PredictionFeedbackConsumed(); }