package eu.gaudian.translator.model.grammar

import kotlinx.serialization.Serializable

@Serializable
sealed class UnifiedMorphology {

    /**
     * 2D Grid for Nouns (Case x Number) and Adjectives (Gender x Number).
     */
    data class Grid(
        val title: String,
        val rowLabels: List<String>,
        val colLabels: List<String>,
        val cells: Map<String, String>
    ) : UnifiedMorphology()

    /**
     * Verb Paradigm (Flattened - no intermediate 'paradigm' object).
     */
    data class Verb(
        val infinitive: String,
        val auxiliary: String?,
        val tenses: Map<String, List<String>>,
        val pronouns: List<String>
    ) : UnifiedMorphology()

    /**
     * Generic List. Now holds 'Inflection' objects to keep tags visible.
     */
    data class ListForms(
        val forms: List<Inflection>
    ) : UnifiedMorphology()
}

/**
 * Moved here to be shared. Represents a single form with its tags.
 */
@Serializable
data class Inflection(
    val form: String,
    val tags: List<String>
)