package com.pixelized.shared.lwa.model.campaign

import com.pixelized.shared.lwa.model.map.Map

data class Campaign(
    val characters: Set<String>,
    val npcs: Set<String>,
    val map: MiniMap?,
    val scene: Scene,
    val options: Options,
) {
    val instances = characters + npcs

    data class MiniMap(
        val id: String,
        val camera: Map.Camera?,
    ) {
        companion object {
            fun empty(): MiniMap? = null
        }
    }

    data class Scene(
        val name: String,
    ) {
        companion object {
            fun empty() = Scene(
                name = "",
            )
        }
    }

    data class Options(
        val showParty: Boolean,
        val showNpcs: Boolean,
    ) {
        companion object {
            fun empty() = Options(
                showParty = true,
                showNpcs = false,
            )
        }
    }

    companion object {
        fun empty() = Campaign(
            characters = emptySet(),
            npcs = emptySet(),
            map = null,
            scene = Scene.empty(),
            options = Options.empty(),
        )
    }
}