use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[allow(non_snake_case)]
// 管理器平台的配置（例如magisk、kernelsu、apatch）
/// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public struct 'ManagerConfig'. Replace with real documentation. (2025-12-30T22:23:21Z)
pub struct ManagerConfig {
    // 最低兼容版本（数字）
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'min' in 'ManagerConfig'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub min: Option<i64>,
    // 支持的设备列表（可用于过滤）
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'devices' in 'ManagerConfig'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub devices: Option<Vec<String>>,
    // 支持的架构列表
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'arch' in 'ManagerConfig'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub arch: Option<Vec<String>>,
    // 依赖的其它模块/组件标识
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'require' in 'ManagerConfig'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub require: Option<Vec<String>>,
}

impl Default for ManagerConfig {
    fn default() -> Self {
        Self {
            min: None,
            devices: Some(vec![]),
            arch: Some(vec![]),
            require: Some(vec![]),
        }
    }
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[allow(non_snake_case)]
// 不同包管理器或平台的配置组合
/// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public struct 'ManagerSection'. Replace with real documentation. (2025-12-30T22:23:21Z)
pub struct ManagerSection {
    // Magisk相关配置
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'magisk' in 'ManagerSection'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub magisk: Option<ManagerConfig>,
    // kernelsu相关配置
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'kernelsu' in 'ManagerSection'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub kernelsu: Option<ManagerConfig>,
    // apatch相关配置
    /// AUTO-GENERATED BY Kam/scripts/add_missing_docs.py: placeholder documentation for public field 'apatch' in 'ManagerSection'. Replace with real documentation. (2025-12-30T22:23:21Z)
    pub apatch: Option<ManagerConfig>,
}

impl Default for ManagerSection {
    fn default() -> Self {
        Self {
            magisk: Some(ManagerConfig::default()),
            kernelsu: Some(ManagerConfig::default()),
            apatch: Some(ManagerConfig::default()),
        }
    }
}
