package app.furmeet.events.system.schedule.abstractDataTypes.convention

import app.furmeet.events.system.helper.Language
import app.furmeet.events.system.schedule.abstractDataTypes.GregorianCalendarRange
import java.io.Serializable
import java.util.*

class Convention(
    val events: List<Event>,
    val places: List<Place>,
    val registrationTiers: List<RegistrationTier>,
    val lowestRegistrationTier: RegistrationTier,
    val tags: List<Tag>,
    val id: String,
    val name: String,
    val genericName: String,
    val theme: Map<Language, String>,
    val rules: Map<Language, String>,
    val additionalRules: List<AddtionalRules>,
    val officialLifespan: GregorianCalendarRange,
    val startCalendarOn: GregorianCalendar,
    val endCalendarOn: GregorianCalendar,
    val paddingStartOfDayMillis: Long,
    val paddingEndOfDayMillis: Long,
    val days: List<GregorianCalendar>,
    val splitDayIn: Int,
    val timeZone: TimeZone,
    val socialMedias: List<SocialMedia>,
    val notificationFireMinutesBefore: Int,
    val r621checker: Boolean,
    val skipRegistrationTier: Boolean,
    val maps: List<MapImage>,
    val registrationLinks: List<RegistrationLink>,
    val imageDefaultEvent: Map<Language, String>?,
    val imageFavorites: Map<Language, String>?,
    val hashtagReminder: String?,
    val nextEdition: GregorianCalendar?,
    val colorScheme: ConventionColorScheme?,
) : Serializable {
    val allImages
        get() =
            listOfNotNull(
                imageFavorites,
                imageDefaultEvent
            ) + maps.map { it.image } + events.mapNotNull { it.assetImage }
}