package com.placeholder.sherpai2.ui.rollingscan

/**
 * RollingScanState - UI states for Rolling Scan feature
 *
 * State machine:
 * Idle → Loading → Ready ⇄ Error
 *                    ↓
 *              SubmittedForTraining
 */
sealed class RollingScanState {

    /**
     * Initial state - not started
     */
    object Idle : RollingScanState()

    /**
     * Loading initial data
     * - Fetching cached embeddings
     * - Building image URI cache
     * - Loading seed embeddings
     */
    object Loading : RollingScanState()

    /**
     * Ready for user interaction
     *
     * @param totalPhotos Total number of scannable photos
     * @param selectedCount Number of currently selected photos
     */
    data class Ready(
        val totalPhotos: Int,
        val selectedCount: Int
    ) : RollingScanState()

    /**
     * Error state
     *
     * @param message Error message to display
     */
    data class Error(val message: String) : RollingScanState()

    /**
     * Photos submitted for training
     * Navigate back to training flow
     */
    object SubmittedForTraining : RollingScanState()
}