package app.closer.domain.model

/**
 * A bucket list item added by one or both partners.
 *
 * Shared list where both partners can add, complete, and delete items.
 * Categories: Adventure, Travel, Food, Learning, Romance, Intimacy, Seasonal.
 *
 * Stored in Firestore under couples/{coupleId}/bucket_list/{itemId}.
 */
data class BucketListItem(
    val id: String = "",
    val coupleId: String = "",
    val title: String = "",
    val description: String = "",
    val category: String = "",
    val addedBy: String = "",
    val addedAt: Long = 0L,
    val completedBy: String? = null,
    val completedAt: Long? = null,
    val isCompleted: Boolean = false
)

enum class BucketListCategory {
    ADVENTURE,
    TRAVEL,
    FOOD,
    LEARNING,
    ROMANCE,
    INTIMACY,
    SEASONAL;

    fun toFirestoreValue(): String = name.lowercase()

    companion object {
        fun fromFirestoreValue(value: String): BucketListCategory = when (value) {
            "adventure" -> ADVENTURE
            "travel" -> TRAVEL
            "food" -> FOOD
            "learning" -> LEARNING
            "romance" -> ROMANCE
            "intimacy" -> INTIMACY
            "seasonal" -> SEASONAL
            else -> ADVENTURE
        }
    }
}
