package app.closer.domain.model

/**
 * A curated date idea presented to both partners for independent swiping.
 *
 * @property id Stable Firestore document ID.
 * @property title Short, evocative name shown on the card.
 * @property description One or two sentences explaining the date.
 * @property category Category key, aligned with question categories.
 * @property estimatedDuration Approximate duration label (e.g. "30 min", "2–3 hours").
 * @property estimatedCost Cost level: free, low, medium, high.
 * @property isPremium True when the idea requires an active premium entitlement.
 * @property createdAt Server timestamp of when the idea was added.
 */
data class DateIdea(
    val id: String = "",
    val title: String = "",
    val description: String = "",
    val category: String = "",
    val estimatedDuration: String = "",
    val estimatedCost: DateCostLevel = DateCostLevel.FREE,
    val isPremium: Boolean = false,
    val createdAt: Long = 0L
)

enum class DateCostLevel {
    FREE,
    LOW,
    MEDIUM,
    HIGH;

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

    companion object {
        fun fromFirestoreValue(value: String): DateCostLevel = when (value) {
            "free" -> FREE
            "low" -> LOW
            "medium" -> MEDIUM
            "high" -> HIGH
            else -> FREE
        }
    }
}
