use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MovingAverageInfo {
    pub id: &'static str,
    pub label: &'static str,

    pub requires_candles: bool,
    pub period_based: bool,
    pub single_output: bool,

    pub supports_cpu_single: bool,
    pub supports_cpu_batch: bool,

    pub supports_cuda_single: bool,
    pub supports_cuda_sweep: bool,

    pub notes: Option<&'static str>,
}

pub fn list_moving_averages() -> &'static [MovingAverageInfo] {
    &[
        MovingAverageInfo {
            id: "sma",
            label: "SMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "ema",
            label: "EMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "dema",
            label: "DEMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "tema",
            label: "TEMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "smma",
            label: "SMMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "zlema",
            label: "ZLEMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "wma",
            label: "WMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "alma",
            label: "ALMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "cwma",
            label: "CWMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "corrected_moving_average",
            label: "Corrected Moving Average",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: false,
            notes: Some("CPU, Python, and WASM only."),
        },
        MovingAverageInfo {
            id: "cora_wave",
            label: "CoRa Wave",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "edcf",
            label: "EDCF",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "fwma",
            label: "FWMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "gaussian",
            label: "Gaussian",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "highpass",
            label: "HighPass",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "highpass_2_pole",
            label: "HighPass (2-pole)",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "hma",
            label: "HMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "jma",
            label: "JMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "jsa",
            label: "JSA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "linreg",
            label: "LinReg",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "logarithmic_moving_average",
            label: "Logarithmic Moving Average",
            requires_candles: false,
            period_based: true,
            single_output: false,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: false,
            notes: Some("CPU, Python, and WASM only."),
        },
        MovingAverageInfo {
            id: "kama",
            label: "KAMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "ehlers_kama",
            label: "Ehlers KAMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "ehlers_itrend",
            label: "Ehlers ITrend",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "ehlers_ecema",
            label: "Ehlers ECEMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "ehlers_pma",
            label: "Ehlers PMA",
            requires_candles: false,
            period_based: true,
            single_output: false,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: Some("Dual-output; CPU and CUDA batch support output selection via typed params."),
        },
        MovingAverageInfo {
            id: "ehlers_undersampled_double_moving_average",
            label: "Ehlers Undersampled Double Moving Average",
            requires_candles: false,
            period_based: false,
            single_output: false,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: false,
            notes: Some("Dual-output; CPU batch support output selection via typed params."),
        },
        MovingAverageInfo {
            id: "ehma",
            label: "EHMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "nama",
            label: "NAMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "n_order_ema",
            label: "N Order EMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: false,
            notes: Some("CPU, Python, and WASM only."),
        },
        MovingAverageInfo {
            id: "nma",
            label: "NMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "pwma",
            label: "PWMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "reflex",
            label: "Reflex",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "sinwma",
            label: "SinWMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "sqwma",
            label: "SqWMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "srwma",
            label: "SrWMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "sgf",
            label: "SGF",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: Some("Savitzky-Golay endpoint smoother; even periods use period-1."),
        },
        MovingAverageInfo {
            id: "swma",
            label: "SWMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "supersmoother",
            label: "SuperSmoother",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "supersmoother_3_pole",
            label: "SuperSmoother (3-pole)",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "tilson",
            label: "Tilson",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "trendflex",
            label: "TrendFlex",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "ema_deviation_corrected_t3",
            label: "EMA-Deviation-Corrected T3",
            requires_candles: false,
            period_based: true,
            single_output: false,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: false,
            notes: Some("Primary output is the corrected line; secondary output is the raw T3 line."),
        },
        MovingAverageInfo {
            id: "wave_smoother",
            label: "Wave Smoother",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: false,
            notes: Some("Uses Pine-style wave weights and first-non-NaN history fill semantics."),
        },
        MovingAverageInfo {
            id: "trima",
            label: "TRIMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "wilders",
            label: "Wilders",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "vpwma",
            label: "VPWMA",
            requires_candles: true,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "vwma",
            label: "VWMA",
            requires_candles: true,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "elastic_volume_weighted_moving_average",
            label: "Elastic Volume Weighted Moving Average",
            requires_candles: true,
            period_based: false,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: false,
            notes: Some("Direct API defaults to absolute-volume mode; generic MA period-based routes use the length parameter with volume-sum mode."),
        },
        MovingAverageInfo {
            id: "dma",
            label: "DMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "epma",
            label: "EPMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "sama",
            label: "SAMA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "maaq",
            label: "MAAQ",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "buff_averages",
            label: "Buff Averages",
            requires_candles: true,
            period_based: false,
            single_output: false,
            supports_cpu_single: false,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: true,
            notes: Some("Dual-output (fast/slow); CPU and CUDA batch support output selection via typed params."),
        },
        MovingAverageInfo {
            id: "frama",
            label: "FRAMA",
            requires_candles: true,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: Some("Uses high/low/close; source is ignored."),
        },
        MovingAverageInfo {
            id: "volatility_adjusted_ma",
            label: "Volatility Adjusted MA",
            requires_candles: false,
            period_based: true,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "vwap",
            label: "VWAP",
            requires_candles: true,
            period_based: false,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: true,
            notes: Some("Not period-based."),
        },
        MovingAverageInfo {
            id: "tradjema",
            label: "TrAdjEMA",
            requires_candles: true,
            period_based: false,
            single_output: true,
            supports_cpu_single: false,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: true,
            notes: Some("Requires high/low for single-call path; available via CPU and CUDA batch."),
        },
        MovingAverageInfo {
            id: "uma",
            label: "UMA",
            requires_candles: true,
            period_based: false,
            single_output: true,
            supports_cpu_single: false,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: true,
            notes: Some("Requires volume for single-call path; available via CPU and CUDA batch."),
        },
        MovingAverageInfo {
            id: "volume_adjusted_ma",
            label: "Volume Adjusted MA",
            requires_candles: true,
            period_based: false,
            single_output: true,
            supports_cpu_single: false,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: true,
            notes: Some("Requires volume for single-call path; available via CPU and CUDA batch."),
        },
        MovingAverageInfo {
            id: "mama",
            label: "MAMA",
            requires_candles: false,
            period_based: false,
            single_output: false,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: false,
            supports_cuda_sweep: true,
            notes: Some("Dual-output; CPU and CUDA batch support output selection via typed params."),
        },
        MovingAverageInfo {
            id: "mwdx",
            label: "MWDX",
            requires_candles: false,
            period_based: false,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
        MovingAverageInfo {
            id: "hwma",
            label: "HWMA",
            requires_candles: false,
            period_based: false,
            single_output: true,
            supports_cpu_single: true,
            supports_cpu_batch: true,
            supports_cuda_single: true,
            supports_cuda_sweep: true,
            notes: None,
        },
    ]
}
