package app.closer.domain.model

/**
 * A generated date suggestion surfaced to a couple at a useful moment.
 *
 * This model carries only metadata: what activity to suggest, why it was triggered,
 * and how strongly it should be prioritized. It never contains private answer text.
 *
 * @property triggerReason why the suggestion was generated
 * @property suggestedActivity human-readable activity suggestion
 * @property priority higher numbers are more urgent/interesting
 * @property categoryId optional question/date category that informed the suggestion
 * @property sourceFlags bitmap describing which inputs influenced this suggestion;
 *                      revealed answers are explicitly tagged as [SourceFlag.REVEALED_ANSWER]
 *                      and hidden answer text is never used
 */
data class DateSuggestion(
    val triggerReason: DateSuggestionTrigger,
    val suggestedActivity: String,
    val priority: Int,
    val categoryId: String? = null,
    val sourceFlags: List<SourceFlag> = emptyList()
) {
    /**
     * True when the suggestion was informed by an already-revealed answer.
     * Used to drive privacy-safe copy and analytics.
     */
    val isFromRevealedAnswer: Boolean
        get() = SourceFlag.REVEALED_ANSWER in sourceFlags
}

enum class DateSuggestionTrigger {
    CATEGORY_SURGE,
    WEEKLY_RECAP_COMPLETED,
    CHALLENGE_COMPLETED,
    PARTNER_SAVED_DATE_IDEA,
    SHARED_INTEREST_REVEALED
}

enum class SourceFlag {
    CATEGORY_METADATA,
    REVEALED_ANSWER,
    PARTNER_ACTION,
    CHALLENGE_CONTEXT,
    RECAP_CONTEXT
}
