import 'package:flutter_riverpod/flutter_riverpod.dart';

/// Tracks where the user came from when they entered an auth flow.
///
/// `onboarding` is set when the user taps a transaction CTA ("aku mau
/// curhat" / "curhat sama bestie baru") that drives them into the §2
/// New-User Onboarding journey. Post-OTP, the router consumes this and
/// pushes /payment/entry (which dispatches S6 paywall vs PickMethod via
/// `first_session_discount.eligible`).
///
/// `recover` (default) is the SHome1st "masuk →" login-recover banner
/// path — the spec doesn't route this through /payment/entry; the user
/// expects to land on /home with their chat history.
///
/// Spec ref: requirement/flow_customer.mermaid.md §2 (`UserLookup → S6
/// or PickMethod`).
enum OnboardingIntent { recover, onboarding }

final onboardingIntentProvider =
    StateProvider<OnboardingIntent>((ref) => OnboardingIntent.recover);
