//! Arguments for `mcptest badge`: emit a CI status badge.

use std::path::PathBuf;

use clap::{Args, ValueEnum};

/// Emit a CI status badge (shields.io endpoint JSON or SVG) from a score or a
/// saved report, for embedding in a README.
#[derive(Debug, Args)]
pub struct BadgeArgs {
    /// A saved JSON report to derive the score from: a compliance run (with a
    /// `numeric_score`) or any object with a `score`. Omit when using --score.
    #[arg(value_name = "REPORT")]
    pub report: Option<PathBuf>,

    /// Use this score (0-100) directly instead of reading a report.
    #[arg(long, conflicts_with = "report")]
    pub score: Option<f64>,

    /// Badge label (left-side text).
    #[arg(long, default_value = "mcptest")]
    pub label: String,

    /// Output format.
    #[arg(long, value_enum, default_value_t = BadgeFormat::Json)]
    pub format: BadgeFormat,
}

/// Output formats for `mcptest badge`.
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, ValueEnum)]
#[value(rename_all = "kebab-case")]
pub enum BadgeFormat {
    /// shields.io endpoint JSON (default), for an `<img>` that points at shields.
    #[default]
    Json,
    /// A self-contained SVG you can commit and embed directly.
    Svg,
}
