// Copyright (C) 2026 Jason M. Schwefel. All Rights Reserved.
package com.coldboreballisticsllc.scopedope.label.renderer

import android.graphics.Bitmap
import com.coldboreballisticsllc.scopedope.domain.model.LabelEntry
import com.coldboreballisticsllc.scopedope.domain.model.WindLabel
import com.coldboreballisticsllc.scopedope.label.format.LabelFormat

enum class ElevationSymbol { PLUS_MINUS, ARROWS }

/**
 * Options passed to every [LabelRenderer.render] call.
 * Renderer implementations use the fields relevant to their format.
 */
data class RenderOptions(
    val adjDecimals:           Int              = 1,
    val showGridlines:         Boolean          = true,
    val fullCircle:            Boolean          = false,
    val elevationSymbol:       ElevationSymbol  = ElevationSymbol.PLUS_MINUS,
    val columnFillInterleaved: Boolean          = true,
    val landscapeCol1Reversed: Boolean          = true,
    val useMoa:                Boolean          = false,
    val useMetric:             Boolean          = false,
    val useSemanticColors:     Boolean          = false,
)

interface LabelRenderer {
    val format: LabelFormat

    fun render(
        entries:   List<LabelEntry>,
        windLabel: WindLabel?,
        targetDpi: Int,
        options:   RenderOptions = RenderOptions(),
    ): Bitmap
}
